Remove use of typeof for undefined properties

Per style guide, use plain undefined checks instead.