avoid InvalidOperation and NullReferenceException

Yet another trait look up from a dead actor #5522.