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.
@brutaldev want to give writing a test for this a shot?