Fixed unchecked array length crash on iOS with optional values in trackEvent