My common problem is that it depends on where the keys are coming from.
If they are entered by any user or an unreliable system, I use Optionso that I can meaningfully indicate the possibility of an unknown key and deal with it accordingly.
, ( , , , ), , , , . , - URL- , undefined, , IMO.
, , . Option None catch-all, , , . NotFound (, ), Option ( Either Scala), .
Java, Option , Scala . , Option Java . null, " ".