title: null check in try catch
body: <p>I have a try catch block in my WCF service method that contains an if check on an object. The object 'objRequest' comes in as a service operation input parameter. This is the  code:</p>
  
  <pre><code>try
  {
      if (objRequest == null)
      {
          //the lines here dont execute even though objRequest is null
          ...
          ...
      }
  
      //remaining code here
  }
  catch
  {
      ...
  }
  </code></pre>
  
  <p>Now comes the strange part. If I put that if check outside the try block, the if check works.</p>
  
  <pre><code>if (objRequest == null)
  {
   //This 'if' check returns true when outside the try block and the line now executes.
    .....
    ....
  
  }
  try
  {
  
  
      //remaining code here
  }
  catch
  {
      ...
  }
  </code></pre>
  
  <p>Clipped an image here to prove what I am saying. If the object is null, why did it go into the else block?
  <img src="https://i.stack.imgur.com/J5KXw.png" alt="enter image description here"></p>
  
  <p>I find this magical, and not in a good way. What am I missing here?</p>