code: function getGripType(object, noGrip) {
    if (noGrip || Object(object) !== object) {
      return typeof object;
    }
    if (object.type === "object") {
      return object.class;
    }
    return object.type;
  }
docs: Get the type of an object.
  
  @param {Object} Grip from which we want the type.
  @param {boolean} noGrip true if the object is not a grip.
  @return {boolean}