IsValid node not working

This got rid of the two invalid actor errors for the LastSpawnRoom variable. Could you explain why this error happens or why this solution works? I want to prevent this kind of error if possible.

Edit: The AccessedNone error is now appearing for a different variable:

I think this is where the new error is happening: