Optimize is_protected_type slightly (used by force_text, which is used basically everywhere)