fix check for null in logger

Testing for log substitution from @brutaldev

Fixes #583