title: Do I need to check if the object is null before a dispose() command?
body: <p>I have an object, for example <code>HttpWebResponse</code> ,that implements <code>IDisposable</code>, and therefore should be disposed.  </p>
  
  <p>Having this:  </p>
  
  <pre><code>HttpWebResponse a = ....;  
  </code></pre>
  
  <p>What will be the correct way of handling the object?  </p>
  
  <pre><code>a.Dispose(); 
  </code></pre>
  
  <p>Or:  </p>
  
  <pre><code>if (a!= null)
      a.Dispose();  
  </code></pre>
  
  <p>Should I even care if the object is null? Can't I just Dispose it anyway?</p>