Added function to check if param is array.

Using Object.prototype.toString which has <=IE8 support to check the
param.