Array is an object in JavaScript. To check if a variable is an array, you need to do this:

a.constructor === Array