HIVE-7527: fix NPE