Fix bug in DatasetFormatter: type might be an array instead of a string