Fixed test code, added null check in ChooseMove