User753101303 posted
Hi,
You are sure it happens ? It's common to use lists which are not null but empty. I expect concatenating empty lists should work (it should just left the source list unchanged).
I wonder if the problem couldn't be that you are using mistalkenly DefaulfEmpty. For example with :
var a = new List<string> { "a", "b" };
var b = new List<string>();
var c = a.Concat(b); will be the same than a that is "a","b"
var c = a.Concat(b.DefaultIfEmpty()); is "a","b", null because with DefaultIfEmpty you asked to return a singleton list with the default value for its element type (and the default value for a string is null)
var c = a.Concat(b.DefaultIfEmpty("z")); would return the "a", "b", "z" list.
So in short I wonder if you don't want to ,just use :
nonmandat.RelatedPersons.Concat(nonmandat.RelatedFamilies).Concat(nonmandat.RelatedCorporateBodies).ToList();