title: JSON null value using opt()
body: <p>I am working on a API that has a bad design by putting <code>null</code> value on some item that originally holds double/float value. Now I thought there must be a short solution where I do not need to make tons of if else statement just to check if a value is null which seems to be done by using <code>optDouble(&quot;key&quot;, fallback_value)</code> but the error still hits whenever a field value is null.</p>
  <p>Stacktrace:</p>
  <pre><code>W/System.err: org.json.JSONException: Value null at median_tx_value of type org.json.JSONObject$1 cannot be converted to double
  </code></pre>
  <p>I tried to check the source code of method</p>
  <pre><code>/**
       * Returns the value mapped by {@code name} if it exists and is a double or
       * can be coerced to a double, or {@code fallback} otherwise.
       */
      public double optDouble(@Nullable String name, double fallback) {
          Object object = opt(name);
          Double result = JSON.toDouble(object);
          return result != null ? result : fallback;
      }
  </code></pre>
  <p>It seems the error starts at <code>JSON.toDouble(object)</code> where object is null already. Is there any way to achieved it without using third party library?</p>