added some safeguards/sanity checks for tokenization on dataset iterator