make sure we are getting an array and not an error object