Tamed undefined

`undefined` changed to safer `void 0` and `== undefined` changed to shorter idiomatic `== null`.