fixed typo in test, also Array.isArray instead of instanceof Array