code: function typeOf(obj) {
          if (obj === null) {
              return typeOfNull;
          } else if (obj === undefined) {
              return typeOfUndefined;
          } else {
              return possibleTypes[
                  Object.prototype.toString.call(obj).slice(8, -1) // Returns a string like "Object", "Array", "String", ...
              ];
          }
      }
docs: The only way to check for a type in JavaScript is to compare the
  result of the internal .toString() method (returns something like [object Array])
  
  The type can be something of:
  
  - Object
  - Array
  - Date
  - Function
  - RegExp
  - Number
  - Boolean
  - String
  - Null
  - Undefined
  
  The first character of the type must be a capital letter (unlike you may be
  used to the typeof operator)
  
  @private
  @param {*} obj
  @returns {Boolean} result