check for object vs. array