Fix getCreature/getPermanent/getWeaponShield functions