Added null planet check for transferToPlanet, Fixes #898