Make sure we have an error before merging user fields

If an exception is captured from within the window.onerror handling (which can happen
if the code being run isn't wrapped in a try/catch block somehow), error will be
undefined in the TraceKit callback.