Using `Object.prototype.toString.call` is also a pretty dirty hack, especially to detect an "array". I think `typeof obj === "object" && obj.length` would suffice, even if certain false positives like string objects leak through.
[0]: http://i.imgur.com/RNBYd.png
[1]: http://msdn.microsoft.com/en-us/library/dd347148(v=VS.85).as...