Check that `error` actually parsed before indexing on 2FA check

If the server responded with XML here, `error` ends up as `nil`. Double check that we actually have a result before checking the identifier.