After an AJAX request, sometimes my application may return an empty object, like: var a = {}; How can I check whether that's the case? ECMA 5+: // because Object.keys(new Date()).length === 0; // we have to do some additional check obj // null and undefined check && Object.keys(obj).length === 0 && obj.constructor === Object Note, though, that this creates an unnecessary array (the return value ..