If the group label field in data is null (not an empty string) then an exception is thrown in GroupingCollection.buildGroups line 1260.
Seems to me that the problem is that the getDataLabel function checks for the field not existing in the data, but not that it exists but is null. Then the test on line 1191 fails if the value is null but works if it is an empty string causing currentGroups to not get assigned and the exception get thrown when currentGroups is subsequently accessed on line 1260

