title: Linq "Object reference not set to an instance of an object."
body: <p>Am a little lost on this one.  Getting the error <code>Object reference not set to an instance of an object.</code> on the line <code>db.EntityRichContents.DeleteAllOnSubmit(q);</code> at runtime.  Project builds fine.</p>
  
  <pre><code>protected override void ControllerOnEntityDeleted(EntityObj forEntity, EntityDeletionController.DeletionAction newStatus)
  {
      if (newStatus == EntityDeletionController.DeletionAction.HardDelete)
      {
          if(forEntity == null) throw new Exception();
  
          using (var db = new DBContext())
          {
              var q = db.EntityRichContents.Where(c =&gt; c.C3Entity == ForEntity.TypeID &amp;&amp; c.C3EntityRecordID == ForEntity.ID);
              db.EntityRichContents.DeleteAllOnSubmit(q);
              db.SubmitChanges();
          }
      }
  }
  </code></pre>
  
  <p>Checking <code>q.Any()</code> or <code>q == null</code> doesn't help in any way (q isn't null).</p>