handles invalid board inputs