BZ-1045688: prevent NPE and logging the issue