Object.isEmpty = function(self) {
if (self == null) return false;//
if (self instanceof Array || typeof self == 'string') return !self.length;
var empty = new self.constructor();
for (var key in self) {
if (!(key in empty) || self[key] !== empty[key]) return false;
}
return true;
};