Add accessor to know if TListOfDataMembers contains TDataMember or TGlobal
Fix valgrind report from ROOT-6804.

The TListOfDataMembers can contains either TDataMember or TGlobal.