Prevent a NPE in a logging statement