Use NWScript's GetIsObjectValid to determine if a GameObject in the GameObjectManager collection is valid before returning it.