I am trying to do, get randomly one of "list of objects" from all lists.
I am getting `NullReferenceException` I also tried List couldn't make it work.

```
List<BL.Test.Test> Tests = BL.Test.GET.TestGroup(CategoryId);

// NullReferenceException on the line below:
int[] Groups = Tests.Select(d => d.TestGroupId).Distinct().ToArray(); 

Session["TestGroup"] = Tests.Select(t => t.TestGroupId = Groups[rnd.Next(Groups.Length)]);

```

![Tests not null](https://i.stack.imgur.com/JRCRL.jpg)