BS-10380
Fix various npe