Fix a small logging NPE