Removed dependency on Array.isArray