Add overflow checking for CHECKVAL.