title: Java String.valueOf(null) throws NPE, but Object a = null; String.valueOf(a) returns 'null'
body: <p>Is there a logical language-design-type explanation for the following behaviour (Java 7 and I suspect earlier editions as well):</p>
  
  <pre><code>    Object  a = null;
      String as = String.valueOf(a);              // as is assigned "null"
      System.out.println(as+":"+as.length());     // prints: "null:4"
      System.out.println ( String.valueOf(null)); // NPE
  </code></pre>