Prevent NPE in CheckGlobalNames.