Might be best to explicitly add a check for `undefined`, to make it clear what it does. Currently if I understand it correctly, it would return `undefined` implicitly because of no matches in the `switch` statement. Is that the desired behavior?