How to Check if a Key Exists in a JavaScript Object | CodeTrail