improve logic for action/toolbar validation by extensions