added polyfill for Array.isArray()