fix check for undefined instead of false value for logger

Fixes #583