LPS-26352: Adding defensive code to prevent NPEs in case of strange creole source