function isObject(val) {
  return Object.prototype.toString.call(val) === '[object Object]';
}
Checks if something is an object.

@param {*} val The something you want to check.
@return true if val is an object, false otherwise.