Oh My God! I think this could be more shorter than ever, let see this:
# Short and Final code
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
function isObject(obj)
{
return obj != null && obj.constructor.name === "Object"
}
console.log(isObject({})) // returns true
console.log(isObject([])) // returns false
console.log(isObject(null)) // returns false
<!-- end snippet -->
# Explained
## Return Types
typeof JavaScript objects (including `null`) returns `"object"`
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
console.log(typeof null, typeof [], typeof {})
<!-- end snippet -->
## Checking on Their constructors
Checking on their `constructor` property returns function with their names.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
console.log(({}).constructor) // returns a function with name "Object"
console.log(([]).constructor) // returns a function with name "Array"
console.log((null).constructor) //throws an error because null does not actually have a property
<!-- end snippet -->
## Introducing Function.name
`Function.name` returns a readonly name of a function or `"anonymous"` for closures.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
console.log(({}).constructor.name) // returns "Object"
console.log(([]).constructor.name) // returns "Array"
console.log((null).constructor.name) //throws an error because null does not actually have a property
<!-- end snippet -->
> **Note:** [As of 2018, Function.name might not work in **IE**][1]
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#Browser_compatibility