MARI-4 MARI-13 MARI-24 updated check if value exists before looking up the codes