title: Any way to know if a variable is an angularjs promise?
body: <p>I'm making a directive that takes a function as a scope parameter (<code>scope: { method:'&amp;theFunction' }</code>). I need to know if the result returned by that method is an angular promise (if yes something will happen on resolution, otherwise it happens right away). </p>
  
  <p>For now I'm testing if <code>foo.then</code> exists but I was wondering if there was a better way to do it.</p>