Input error checking.