Check HapDecodeCallback is valid, before trying to call it.