Consolidate integer grid error checking into a new subroutine grid_checkIntegerGridValues.