Check if data is array by checking if length undefined