asserts replaced with exception for image classification task, csv, json
Fixes for csv, json in io module and image_classification task with tests referenced in https://github.com/huggingface/datasets/issues/3171