Fix crash if compliance is not known to gnupg
We need to check if entry is null because older gnupg versions might not have that config entry.
BUG: 389291