Use Array.isArray is simplify code a bit
Merge pull request #1 from remcoder/master

Use Array.isArray is simplify code a bit