Thought I would add another option for those who might already be using the Underscore.js library in their script. Underscore.js has an isArray() function (see http://documentcloud.github.com/underscore/#isArrayhttp://underscorejs.org/#isArray).
_.isArray(object)
Returns true if object is an Array.