This is really a few questions wrapped up into one. First off, it is counter-intuitive for many that typeof [] is 'object'. This is simply because an Array is an reference type (null, Date instances, and any other object references also have typeof of object).
Thankfully, to know if an object is an instance of Array, you can now use the convenient Array.isArray(...) function. Alternatively, and you can use this for any type of object, you can do something like b instanceof Array.
Knowing if one of these is empty can be done by checking Object.keys(a).length === 0, though for Arrays it's more natural to do b.length === 0.
Checking any two objects variables (including Arrays) with === will only tell you if the two variables reference the same object in memory, not if their contents are equal.
a === aandb === bare actually true; perhaps you meant that{} === {}and[] === []are both false (which is expected since===does an object reference comparison, and {} and [] both create new objects)