I think this should be ``isinstance(term, (six.binary_type, bool))``