title: nodejs: Check if variable is readable stream
body: <p>How i can check if a var is a readable stream in Nodejs?</p>
  
  <p>Example:</p>
  
  <pre><code>function foo(streamobj){
  
     if(streamobj != readablestream){
         // Error: no writable stream
     }else{
        // So something with streamobj 
     }
  }
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>if (!(streamobj instanceof stream.Readable)){
  </code></pre>
  
  <p>But than i get a ReferenceError: stream is not defined</p>