fix check for null in logger

Testing for log substitution from @brutaldev

Fixes #583
Merge pull request #586 from eddiemonge/i583

fix check for undefined instead of false value for logger