title: Check if hash map key is present before retrieving value
body: <p>Given I am checking my hashmap as follows</p>
  
  <pre><code>String firstName = map.get(UserDetail.FIRST_NAME);
  String lastName = map.get(UserDetail.LAST_NAME);
  String age = map.get(UserDetail.AGE);
  double height = Double.parseDouble(map.get(UserDetail.HEIGHT)
  double weight = Double.parseDouble(map.get(UserDetail.WEIGHT)
  String email = map.get(UserDetail.EMAIL);
  </code></pre>
  
  <p>How would I check that the key actually exists in my hashmap before attempting to retrieve the value. At the moment I keep getting a NullPointerException regularly.</p>