title: implementation of angular.isBoolean?
body: <p>I was reviewing some source code and underscore/lodash was included just for the <code>_.isBoolean</code> function.  The <a href="http://underscorejs.org/docs/underscore.html" rel="noreferrer">underscore source</a> is below:</p>
  
  <pre><code>_.isBoolean = function(obj) {
      return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
  };
  </code></pre>
  
  <p>Looking at <a href="https://docs.angularjs.org/api/ng/function" rel="noreferrer">Function components in ng</a> I see similar functions (<code>angular.isObject</code>, <code>angular.isString</code>, <code>angular.isNumber</code>, etc), but no <code>angular.isBoolean</code> function.</p>
  
  <p>The <a href="https://github.com/angular/angular.js/blob/master/src/Angular.js" rel="noreferrer">angular.js</a> source has this an internal function (source below), but an issue requesting to make public (<a href="https://github.com/angular/angular.js/pull/5185" rel="noreferrer">feat: register isBoolean as a public member of global angular #5185</a>) was closed saying "other libraries like underscore and lodash solve these problems well".</p>
  
  <pre><code>function isBoolean(value) {
    return typeof value === 'boolean';
  }
  </code></pre>
  
  <p><strong>Questions</strong>:</p>
  
  <ul>
  <li>My initial reaction was to copy <code>isBoolean</code> and make a named function in my code, but which implementation is more correct?</li>
  <li>Do I use the underscore version in anticipation of compatibility with a future upgrade?</li>
  <li>I assume it is a bad idea to "duck punch" my implementation into <code>angular.isBoolean</code>?</li>
  </ul>