How do you check if a value is an object in JavaScript?
When everything else fails, I use this:
var isObject = function(item) { return item.constructor.name === "Object"; };