Simplified check in hook_form_alter