code: function checkObject (thing) {
    return typeof thing === "object" &&
           thing !== null &&
           ( Object.getPrototypeOf(thing) === Object.prototype ||
             thing instanceof Object);
  }
docs: complex types