KRACOEUS-8391: fixing NPE
Merge pull request #1162 from leoherbie/KRACOEUS-8391

KRACOEUS-8391: fixing NPE