Determine if the object instance is of a protected type.

    Objects of protected types are preserved as-is when passed to
    force_text(strings_only=True).
431963
def is_protected_type(obj):
    
    return isinstance(obj, six.integer_types + (type(None), float, Decimal,
        datetime.datetime, datetime.date, datetime.time))
297152
def is_one_of(obj, types):
    """"""
    for type_ in types:
        if isinstance(obj, type_):
            return True
    return False
547724
@SuppressWarnings("rawtypes")
	public static boolean isBesicType(Class cls){
		if (cls == null) return false;
		String type = cls.getName();
		return isBasicType(type);
		
	}
895279
function determineType(obj) {
    var type;
    var typeValue;
    var name;

    if (value(obj).typeOf(Object)) {
        type = obj.type || "Object";
    } else {
        type = obj;
    }

    typeValue = value(type);

    if (typeValue.typeOf(String)) {
        name = type.charAt(0).toUpperCase() + type.substring(1);
        return supportedTypes.indexOf(name) === -1 ? "String" : name;
    } else if (typeValue.typeOf(Function)) {
        name = type.toString().match(fnName)[1];
    } else if (typeValue.typeOf(Object)) {
        if (type.type) {
            name = type.type;
        } else {
            return "Object";
        }
    } else {
        name = type.constructor.toString().match(fnName)[1];
    }

    if (supportedTypes.indexOf(name) === -1) {
        throw new TypeError("Type '" + name + "' is not supported");
    }

    return name;
}
286815
def _is_simple_type(value):
    '''
    
    '''
    return isinstance(value, six.string_types) or isinstance(value, int) or isinstance(value, float) or isinstance(value, bool)
58081
def _is_string(thing):
    
    if (_py3k and isinstance(thing, str)):
        return True
    if (not _py3k and isinstance(thing, basestring)):
        return True
    return False
478764
def is_visit_primitive(obj):
    ''''''
    from .base import visit
    if (isinstance(obj, tuple(PRIMITIVE_TYPES)) and not isinstance(obj, STR)
        and not isinstance(obj, bytes)):
        return True
    if (isinstance(obj, CONTAINERS) and not isinstance(obj, STR) and not
        isinstance(obj, bytes)):
        return False
    if isinstance(obj, STR) or isinstance(obj, bytes):
        if len(obj) == 1:
            return True
        return False
    return list(visit(obj, max_enum=2)) == [obj]
1304112
def assertinstance(obj, types):
    
    if isinstance(obj, types):
        return obj
    raise TypeError('{} must be instance of {}'.format(obj, types))
256634
def is_sqlatype_string(coltype: Union[TypeEngine, VisitableType]) -> bool:
    
    coltype = _coltype_to_typeengine(coltype)
    return isinstance(coltype, sqltypes.String)
1084080
private boolean isIgnoredType(Class<?> pReturnType) {
        for (Class<?> type : IGNORED_RETURN_TYPES) {
            if (type.isAssignableFrom(pReturnType)) {
                return true;
            }
        }
        return false;
    }
581584
def is_serializable_type(type_):
    
    if not inspect.isclass(type_):
      return Serializable.is_serializable(type_)
    return issubclass(type_, Serializable) or hasattr(type_, '_asdict')
637621
def _value_is_type_text(val):
    
    if ((u'type' in val.keys()) and
            (val['type'].lower() == u"text")):
        return True
    return False
1063491
private boolean checkEDBObjectModelType(EDBObject object, Class<?> model) {
        String modelClass = object.getString(EDBConstants.MODEL_TYPE);
        if (modelClass == null) {
            LOGGER.warn(String.format("The EDBObject with the oid %s has no model type information."
                    + "The resulting model may be a different model type than expected.", object.getOID()));
        }
        if (modelClass != null && !modelClass.equals(model.getName())) {
            return false;
        }
        return true;
    }
1326503
def is_type(type_, *p):
    
    try:
        for i in p:
            if i.type_ != type_:
                return False

        return True
    except:
        pass

    return False
184666
def is_derived (type, base):
    
    assert isinstance(type, basestring)
    assert isinstance(base, basestring)
    # TODO: this isn't very efficient, especially for bases close to type
    if base in all_bases (type):
        return True
    else:
        return False
34020
def _is_reference(arg):
    '''
    
    '''
    return isinstance(arg, dict) and len(arg) == 1 and isinstance(next(six.itervalues(arg)), six.string_types)
1017638
def is_text_type(text):
    
    if isinstance(text, six.text_type) or isinstance(text, six.string_types):
        return True

    return False