LPS-40689 added null check as in certain cases and app servers this may give NPE