Fix a potential NPE in checking for NEI.