UP-3704 : Added null check to a loop when collecting grouping
information.
Merge pull request #126 from timlevett/UP-3704

UP-3704 : Added null check to a loop when collecting grouping