title: How to check for RLMResults invalidated?
body: <p>When my user logs out, I clear my realm with <code>realm.deleteAll()</code>. After this, I get a lot of notifications resulting in reads from <code>Results</code> objects, which results in an exception <code>realm::Results::InvalidatedException</code>, "RLMResults has been invalidated". I can't find a way to</p>
  
  <ul>
  <li><p>check a <code>Results</code> object for invalidation directly;</p></li>
  <li><p>check a <code>Results</code>' <code>realm</code> object for invalidation; or</p></li>
  <li><p>get the <code>List</code> the <code>Results</code> is derived from in order to check its invalidation state.</p></li>
  </ul>
  
  <p>I can't think of anything else to look for. If there's a better way to clear the database that won't result in exceptions all over the place, I'd be happy to hear about that too.</p>
  
  <p>Additional information: the exception is thrown even when calling <code>count</code> on a <code>Results</code> object, not just accessing its objects.</p>