docs: function typeOf(object) {
    var type = typeof object;
    switch (type) {
      case "object":
        return object == null
          ? "null"
          : typeof object.constructor == "undefined" // COM object
            ? _MSIE_NATIVE_FUNCTION.test(object)
              ? "function"
              : type
            : typeof object.constructor.prototype.valueOf(); // underlying type
      case "function":
        return typeof object.call == "function" ? type : "object";
      default:
        return type;
    }
  }