Fix checking type of data (array is recognized as an object)