This pattern bothers me a bit, if only because 'undefined' isn't an actual keyword, and *could* technically be defined.

Can't think of a really good way to do it, though, unless we change to returning null.