title: Converting a possibly null Double value to a String without exponent
body: <p>I am attempting to create a function that will output a Double as a String with the following requirements:</p>
  <ol>
  <li>It will not show with exponents. I believe Double.toString(dblVal) or dblVal.toString() will take care of the exponent issue.</li>
  <li>If the Double is null it will not error and will display as 'null'. I believe String.valueOf(dblVal) will take care of this automatically if the Double is null.</li>
  </ol>
  <p>Here is what I have:</p>
  <pre><code>function doubleToString(Double dbl) {
      String strVal = null;
      if (dbl != null)
          strVal = String.valueOf(dbl);
      
      return strVal;
  }
  </code></pre>
  <p>What would be the best way to achieve both requirements? I don't think String.valueOf will get rid of the exponent so should I not be using String.valueOf() and instead using dblVal.toString() and then just to a manual check before hand on whether it is null or not and if so make strVal null?</p>