Use Array.isArray() intead of toString()