code: function getObjectType(obj) {
    // Check if type is array of types.
    if (isArray(obj.type)) {
      obj.type = obj.type[0];
    }
  
    return obj.type;
  }
docs: Extracts the type of the object.
  If the type is an array, set type to first in list of types.
  If obj.type is not overridden, it will fail the isPrimitive check.
  Which internally also checks obj.type.
  @param obj - An object.