check number validity using checksum