title: Since when does null.toString() return [object Null]?
body: <p>I'm curious, becouse i thought that </p>
  
  <pre><code>Object.prototype.toString.call(null)
  </code></pre>
  
  <p>return <code>[object Object]</code>, but now i was checking that in Chrome and FF and both returned <code>[object Null]</code>. Now the question is, wether i can assume that Object.prototype.toString will always tell me the good type?</p>
  
  <p>Until now, i was checking every type with this method, but not for null values, i was checking null values by</p>
  
  <pre><code>obj === null;
  </code></pre>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>Note for clarification: this 'problem' is not a serious case, since atm i'm using</p>
  
  <pre><code>function isNull(obj) {
    return obj === null;
  }
  
  function isUndefined(obj) {
    return typeof obj === 'undefined';  
  }
  </code></pre>
  
  <p>which works just fine, but if <code>Object.prototype.toString.call()</code> would work sufficient in older browsers, i could drop these two functions and extend my solution with <code>null</code> and <code>undefined</code> like:<div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var types = ['Object', 'Number', 'String', 'Array', 'Function', 
   'Date', 'RegExp', 'Boolean', 'Error', 'Null', 'Undefined'].reduce(function(prev, type) {
      prev['[object ' + type + ']'] = type.toLowerCase();
   return prev;
    }, {});
  
  function isType(type) {
    return function(obj) {
   return getType(obj) === type;
    };
  }
  
  function getType(obj) {
    return types[Object.prototype.toString.call(obj)];
  }
  
  var isNull = isType('null');
  
  document.querySelector('#console').textContent = isNull(null);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id='console'&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>