Use built-in function isArray