title: In Java 8, transform Optional<String> of an empty String in Optional.empty
body: <p>Given a String I need to get an Optional, whereby if the String is null or empty the result would be Optional.empty.
  I can do it this way:</p>
  
  <pre><code>String ppo = "";
  Optional&lt;String&gt; ostr = Optional.ofNullable(ppo);
  if (ostr.isPresent() &amp;&amp; ostr.get().isEmpty()) {
      ostr = Optional.empty();
  }
  </code></pre>
  
  <p>But surely there must be a more elegant way.</p>