code: function __isPrimitive(obj) {
    if (obj == null) return false;
    // true for numbers, strings, booleans and null, false for objects
    if (obj != Object(obj)) return true;
    return __isDate(obj);
  }
docs: returns true for booleans, numbers, strings and dates false for null, and non-date objects, functions, and arrays