title: operator != cannot be applied to double, null
body: <p>I am getting an error on this code below:</p>
  
  <pre><code>  HashMap map = new HashMap();
    map.put("driver", userId);
    map.put("customer", customerId);
    map.put("rating", 0);
    map.put("timestamp", getCurrentTimestamp());
    map.put("destination", destination);
    map.put("location/from/lat", pickupLatLng.latitude);
    map.put("location/from/lng", pickupLatLng.longitude);
    map.put("location/to/lat", destinationLatLng.latitude);
    map.put("location/to/lng", destinationLatLng.longitude);
    map.put("distance", rideDistance);
    historyRef.child(requestId).updateChildren(map);
  </code></pre>
  
  <p>They said to add:</p>
  
  <p>do <strong>if( pickupLatLng.latitude != null &amp;&amp;  pickupLatLng.longitude != null &amp;&amp; destinationLatLng.latitude != null &amp;&amp; destinationLatLng.longitude != null)</strong> before creating the hashMap, or for each latitude and longitude.</p>
  
  <p>But when i try this i am getting the following error: operator != cannot be applied to double, null</p>
  
  <p>Can someone help me please ?</p>