Added error checking to the get_dice method