LPS-46595 Prevent NPE preserving the right checking order