title: Java 8 extract non null and non empty value from HashMap
body: <p>Let consider a below <code>HashMap</code></p>
  
  <pre><code>HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  </code></pre>
  
  <p>I have values in map like </p>
  
  <pre><code>map.put("model", "test");
  </code></pre>
  
  <p>Currently, if I want to get value from map I am doing</p>
  
  <pre><code>if(map!=null){
   if(map.get("model")!=null &amp;&amp; !map.get("model").isEmpty()){
     //some logic
   }
  }
  </code></pre>
  
  <p>Is there any better approach in Java 8 by using <code>Optional</code> or Lambdas to achieve the above condition?</p>