Duplicate of the code above? Any way to factor this out? And will this ever return `null` (from the `getValueInMapOrNull` call)? If so, mark the return value as `@Nullable`?