Fix an assertion failure in -[RLMRealm invalidate] when the Realm is not in read mode

@alazier 
It's testing for the lack of an assertion failure, not the lack of an exception.