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.
In fact, undefined is a singleton, so really no need for typeof.