             "sr": screenResolution,
             "v": "1"
         ]
-        if !type.isEmpty {
+        
+        if let type = type, !type.isEmpty {
             queryArguments.updateValue(type, forKey: "t")
         }
         

            "dp": appName,
        ]

        send("", parameters: queryArguments)
    }

    /// Tracks an event to Google Analytics.

            "exf": String(isFatal)
        ])
        
        send(type: "exception", parameters: data)
    }
    
    private func send(type:  String?, parameters: [String: String]) {
        guard let trackerId = trackerId else {
            print("GoogleReporter event ignored.")
            print("You must set your tracker ID UA-XXXXX-XX with GoogleReporter.configure()")
