In Java, the upper case Double can be null.
However if I have Doubles
The simplest way in Java 7+ is:
If you are using an earlier version of Java, you can use the conditional operator:
(a != null) ? a.equals(b) : (b == null)