Returns the data type for a given tag pointed to by tagptr.
Valid values for the tag pointed to by tagptr are defined in the enum SystemDataTypes.