Fixes to normalizeName to handle undefined values.