More robust error checking on list parsing