fix check for undefined instead of false value for logger

Fixes #583

Not really sure how to check the output of console.log for this.
i only do unquoted undefined if I know undefined will always be undefined. Otherwise its reassignable.