decodeRecordOrNull

Decodes HasRecord.record as T and returns it or returns null when it cannot be decoded as T