Simpler testing for undefined