obj.hasOwnProperty(key) instead of obj[key]