title: Shorter way to check for null with parseDouble?
body: <p><code>amountStr</code> is a value that occasionally contains a double value represented as a string.</p>
  
  <p>I want to use <code>Double.parseDouble</code> to read it into a <code>double</code> variable: <code>amountDbl</code>.</p>
  
  <pre><code>this.amountDbl = Double.parseDouble(amountStr);
  </code></pre>
  
  <p>It seems to throw a <code>NullPointerException</code> if <code>amountStr</code> doesn't have a value.</p>
  
  <p>Does this mean I have to write a check like this every time?</p>
  
  <pre><code>if(amountStr!=null)
      this.amountDbl = Double.parseDouble(amountStr);
  </code></pre>
  
  <p>Because I have so many statements like this in my code, I'm hoping for a more concise way of doing this check (or avoiding it).</p>