Use isArray() and isObject()