Expect the type to be an object. Unlike expectObject, a type convertible to object is not
acceptable.
978385
void expectActualObject(Node n, JSType type, String msg) {
    if (!type.isObject()) {
      mismatch(n, msg, type, OBJECT_TYPE);
    }
  }
331180
def implements(obj, protocol):
    """"""
    if isinstance(obj, type):
        raise TypeError("First argument to implements must be an instance. "
                        "Got %r." % obj)
    return isinstance(obj, protocol) or issubclass(AnyType, protocol)
60173
function assertType (value, type) {
  var valid;
  var expectedType = getType(type);
  if (expectedType === 'String') {
    valid = typeof value === (expectedType = 'string');
  } else if (expectedType === 'Number') {
    valid = typeof value === (expectedType = 'number');
  } else if (expectedType === 'Boolean') {
    valid = typeof value === (expectedType = 'boolean');
  } else if (expectedType === 'Function') {
    valid = typeof value === (expectedType = 'function');
  } else if (expectedType === 'Object') {
    valid = isPlainObject(value);
  } else if (expectedType === 'Array') {
    valid = Array.isArray(value);
  } else {
    valid = value instanceof type;
  }
  return {
    valid: valid,
    expectedType: expectedType
  }
}
749105
function coercePrimitiveToObject(obj) {
  if (isPrimitive(obj)) {
    obj = Object(obj);
  }
  // istanbul ignore next
  if (NO_KEYS_IN_STRING_OBJECTS && isString(obj)) {
    forceStringCoercion(obj);
  }
  return obj;
}
648496
function is(obj, type) {
      if (!type) {
        return obj !== undefined;
      }

      if (type == 'array' && Arr.isArray(obj)) {
        return true;
      }

      return typeof obj == type;
    }
80097
function clone(obj) {
  if (null == obj || "object" != typeof obj)
    return obj;

  if (obj instanceof Object) {
    var copy = {};
    for (var attr in obj) {
      if (obj.hasOwnProperty(attr)) copy[attr] = clone(obj[attr]);
    }
    return copy;
  }

  throw new Error("Unable to copy obj! Its type isn't supported.");
}
1281130
function _coerceObjectType(obj, objHint){
  if(objHint){
    switch(objHint){
      case 'string':
        //Response that comes back is application/octet-stream, which we will return raw
        return obj;
      case 'buffer':
        return Buffer.from(obj, 'utf8');
      case 'number':
        var num = Number(obj);
        if(isNaN(num)){
          throw new TypeError("'number was requested as a type, but result is NaN!");
        }
        return num;
      case 'array':
        try{
          var pObj = JSON.parse(obj);
          if(pObj[0] == undefined){
            //Is an object, not an array, so we will construct an array of just this object
            return new Array(pObj);
          }
          return pObj;
        }catch(ex){
          //If it fails, then it is likely a single string, lets coerce it to an array
          return new Array(obj);
        }
      case 'boolean':
        //Today's javascript fun-fact: 'false' is truthy!
        if(obj == 'false'){
          return false;
        }
        return Boolean(obj);
      case 'object':
         try{
          var pObj = JSON.parse(obj);
          return pObj;
        }catch(ex){
          //If it fails, then just throw back the object
          return obj;
        }
        break;
    }
  }else{
    return _bestGuessObject(obj);
  }
}
418207
public static <P extends ParaObject> P toObject(String type) {
		try {
			return (P) toClass(type).getConstructor().newInstance();
		} catch (Exception ex) {
			logger.error(null, ex);
			return null;
		}
	}
1242623
def Type(expected, message="Not of type {}"):
    
    @wraps(Type)
    def built(value):
        if type(value) != expected:
            raise Error(message.format(expected.__name__))
        return value
    return built
363812
def Instance(expected, message="Not an instance of {}"):
    
    @wraps(Instance)
    def built(value):
        if not isinstance(value, expected):
            raise Error(message.format(expected.__name__))
        return value
    return built
156581
private static Class<?> convertToObject(Class<?> type) {
        if (type == int.class) {
            return Integer.class;
        }
        else if (type == boolean.class) {
            return Boolean.class;
        }
        else if (type == byte.class) {
            return Byte.class;
        }
        else if (type == char.class) {
            return Character.class;
        }
        else if (type == short.class) {
            return Short.class;
        }
        else if (type == long.class) {
            return Long.class;
        }
        else if (type == float.class) {
            return Float.class;
        }
        else if (type == double.class) {
            return Double.class;
        }
        else if (type == void.class) {
            return Void.class;
        }
        else {
            return type;
        }
    }
284679
function is( instance, Class ) {
		switch ( typeof Class ) {
			case 'function' : return instance instanceof Class;
			case 'string'   : return ( Class = get( Class ) ) ? ( instance instanceof Class ) : false;
		}
		return false;
	}
557514
function objectType(type, variable, explicit) {
		//  array get some special treatment by indicating it is not an object but instead an array
		//  this also goes for inherited types
		if (variable instanceof Array) {
			type = 'array';
		}

		return variable ? variable.constructor.name + (explicit ? '' : '|' + type) : 'null';
	}
1126669
function isNotInstanceOf(value, excludedInstance, message, id) {
    if (message === void 0) { message = ''; }
    if (id === void 0) { id = ''; }
    if (this.enabled && value instanceof excludedInstance) {
        throw ValueException.expectedValue(assertionTypes.NOT_INSTANCE_OF, value, excludedInstance, message, id);
    }
}
1034005
def validate(self, value):
    
    if value is not None and not isinstance(value, self.data_type):
      raise datastore_errors.BadValueError(
          "Property %s must be convertible to a %s instance (%s)" %
          (self.name, self.data_type, value))
    return super(JsonProperty, self).validate(value)
305356
function toObjectOrUndefined(input) {
    let object = input;
    if (typeof input === 'string') {
        try {
            object = JSON.parse(input);
        }
        catch (e) {}
    }
    if (typeof object === 'object') { return object; }
    return undefined;
}
136839
def create_object(object_type, data, **api_opts):
    '''
    
    '''
    if '__opts__' in globals() and __opts__['test']:
        return {'Test': 'Would attempt to create object: {0}'.format(object_type)}
    infoblox = _get_infoblox(**api_opts)
    return infoblox.create_object(object_type, data)