use Array.isArray() not instanceof Array