Procedure when object is invalidated

Thanks for the answer, I think I understand it better now.
My issue is… we have a project which is a bit messy, and we are getting crashes all over the app due Realm invalidated objects, I think this is caused because we are using multiple threads, we store data(realm objects) to use later, but when we are going to use the data the object was already invalidated, so the process shouldn’t even be executed or the code shouldn’t even get to this point.

So what we are trying to look is a way to ensure that when we are going to work with a object reference its not invalidated, if so we should refetch it or make it nil(our code handle it from here) to avoid the crashes.

Our nil validations are useless if the object is there but invalidated