Utility function to constrain the type of a lookup result
the result of a lookup
the value if the lookup was found, undefined otherwise
undefined
Utility function to constrain the type of a lookup result