fixed server error for invalid csv

Returning a list where a string was expected gave a server error for invalid CSV files.