handle the case when the results aren't an array.