core: fix exception when checksum type is nil

Thanks @johnbellone