title: Explanation for weird ReSharper behaviour?
body: <p>Usually I rely on R# hints and suggestions, and often I let it auto-rewrite parts of my code. However, when I encounter issues like the one below I wonder if this is wise.</p>
  
  <p>This code show no "possible null reference exception" warning:</p>
  
  <p><img src="https://i.stack.imgur.com/h4V38.png" alt="enter image description here"></p>
  
  <p>If I add some code that checks Basket for null (no other changes anywhere), suddenly R# warns me:</p>
  
  <p><img src="https://i.stack.imgur.com/nVPc1.png" alt="enter image description here"></p>
  
  <p>This happens in an old ASP.NET website where "Basket" is a page scope object with a protected modifier (I don't know if that matters).</p>
  
  <p>What is R# doing here? Is it inferring that just because the coder tests an object for null it actually <em>might</em> be null?</p>