title: Return null in a method that returns doubles java
body: <p>I am trying to test for a null input at the start of the method. And if found true I want to return null even though the method would usually return doubles. </p>
  
  <p>I need to keep the type of method as double</p>
  
  <pre><code>public double computeMean (double[] grades) {
          if (grades == null) {
              return null;
  </code></pre>
  
  <blockquote>
    <p>Cannot convert from null to double</p>
  </blockquote>