checked if theObject is an array