Some safety checks in TGameObject

Thanks Andreaz of PGD for pointing it out!