fix crash when get traits from actors which are not in world!

Fixes  #6883