title: Checking if an object is a promising function
body: <h3>In protractor.js,</h3>
  
  <p>I have functions that promise/defer. For example</p>
  
  <pre><code>var myFunc = function(_params) {
    var deferred = protractor.promise.defer();
    /***do magical code things****/
    /***wait for other promises***/
    /*****deferred.fulfill();*****/
    return deferred.promise;
  };
  </code></pre>
  
  <p>What sort of combinations of <code>typeof</code> statements can I use to check if this thing (when passed to something else) promises?</p>
  
  <ul>
  <li><code>typeof promiseMaybe === 'function'</code></li>
  <li><code>typeof promiseMaybe.then === 'function'</code>
  
  <ul>
  <li><code>&amp;&amp;</code>'ed with prior?</li>
  </ul></li>
  </ul>
  
  <p>Or is there a non-<code>typeof</code> function like...</p>
  
  <ul>
  <li><code>promiseMaybe.isThenable</code></li>
  <li><code>protractor.promise.isThenable(promiseMaybe)</code></li>
  </ul>
  
  <h3>Clarification</h3>
  
  <p>I have a method that will receive <code>myFunc</code> as a parameter, but this method can also receive strings and finders. I need to know how to tell if a parameter is the function that promises something, possibly before calling the function.</p>