title: Trying to check if urlreferrer is null
body: <p>I am using the following line of code to check if the <code>UrlReferrer</code> is <code>null</code></p>
  
  <p><code>@if (Request.UrlReferrer.AbsolutePath == null)</code></p>
  
  <p>It just gives me an error of:</p>
  
  <pre><code>System.NullReferenceException: Object reference not set to an instance of an object.
  </code></pre>
  
  <p>I'm new to asp and have hunted around but can't seem to find anything that will answer my question.  The thing that confuses me is if I replace null like so:</p>
  
  <p><code>@if (Request.UrlReferrer.AbsolutePath == "/Home")</code></p>
  
  <p>...and the AbsolutePath is indeed /Home, the code works fine, surely I'm asking for the same thing here but with <code>null</code>?</p>