Reintroduce typeof testing for undefined.