[PLAT-4675] Replacing use of NPE