check if object is array
if( Object.prototype.toString.call( someVar ) === '[object Array]' ) { alert( 'Array!' ); }