Added WidgetTypeChecker to ensure correct widget types