IE8 fix for trim and isArray