Testing for equality with Doubles
<p>In Java, the upper case Double can be null.</p>

<p>However if I have Doubles <code>a</code> and <code>b</code> and I do this:</p>

<pre><code>if (a.equals(b))
</code></pre>

<p>it crashes if one of them is null. Is there a better way to compare them?</p>