title: WebException Response attribute returns null
body: <p>I'm scanning a single url that has many paths example: <code>http://url.com/path1</code> to <code>1000</code>.   Sometimes I get a <code>WebException</code> but in my <code>catch</code> block, it will throw a <code>NullReferenceException</code> error if I don't use the line<br>
  <code>if (x.Status == WebExceptionStatus.ProtocolError &amp;&amp; x.Response != null)</code> </p>
  
  <p>So my question is this: Does code below fix the error or just ignore it?</p>
  
  <p>Error don't have a specific path to error just random like <code>http://url.com/path10</code> or any other link thanks :)</p>
  
  <pre><code>catch (WebException x)
  {
      if (x.Status == WebExceptionStatus.ProtocolError &amp;&amp; x.Response != null)
      {
          HttpWebResponse response = (HttpWebResponse)x.Response;
          if (response.StatusCode == HttpStatusCode.NotFound)
          {
             listBox3.Items.add(listBox1.Items[i].ToString());
          }
      }
  }
  </code></pre>