checks if location is safe to teleport before teleporting