corrected doctor error reporting

Calling an environment var which hasn't been set results in `undefined` not `null`
When using the identity operator, `undefined === null` is `false` so the error messages below weren't hitting the right cases.