SyntaxFix
Write A Post
Hire A Developer
Questions
Better way is to use containsKey method of HashMap. Tomorrow somebody will add null to the Map. You should differentiate between key presence and key has null value.
containsKey
HashMap