So i have a function that needs to check if an argument is an object, but this fails because:
typeof [] // returns 'object'
This is a classic javascript gotcha, but i cant remember what to do to actually accept objects, but not arrays.
Try something like this :
obj.constructor.toString().indexOf("Array") != -1
or (even better)
obj instanceof Array