Implementing some error handling in playerBattleState