Given a string-to-number map, add safe getters that return number | undefined respecting noUncheckedIndexedAccess.