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.