LPS-41688 Fix possible NPE