Use Array.isArray instead of instanceof Array