A key can exist with a value of undefined or null. Using hasOwnProperty or in will return true in these cases. Checking the value directly may give you the wrong impression that the key does not exist.