title: Checking for null HttpContext.Current.Cache value
body: <p>In the below snippet, I am trying to assign the cache value if the cache value does not already exist. I get an <em>Object_reference_not_set_to_an_instance_of_an_object</em> error when running the following. What am I missing?</p>
  
  <pre><code>if (string.IsNullOrEmpty(HttpContext.Current.Cache[Key].ToString()))
                  HttpContext.Current.Cache[Key] = data;
  </code></pre>
  
  <p>I looked around on SO but couldnt find something similar. Maybe I am just not wording my problem correctly.</p>