added null check for addAllInternal() , added test

fixes #3330
I would rename this method to 'toDataList'.