Handle case when data is not defined as a dictionary (fixes GH-315)