Prevent LuaException when querying a dead actor's traits in TriggerGlobal

Fixes #6454 

#6377 adds another method to this file which also needs to be fixed this way. Depending on the order these two PRs will be merged, one has to be modified accordingly.
Also, i've kind of neutered the original purpose of this pr with my suggestion so this is now unlikely to fix #6454.