Changed conditional checks for undefined variables to use safer idiom.

Basically, whenever checking for undefined values it is always preferrable to use the `typeof` method.  Consider:

   this.undefVariableName === undefined  // true
	undefVariableName === undefined  // throws a reference error!
        	     null === undefined  // true ( this is wrong, null is not the same as undefined )

the typeof argument is a much more reliable method for finding undefined variables:

	typeof this.undefVariableName // 'undefined'
	typeof undefVariableName      // 'undefined'
	typeof null		      // 'object'