Firestore Authentication: Cannot invoke setData with an argument list of type

Hello all, I'm trying to create a sign up page via Firestore. Here's the code:


import UIKit  
import Firebase  
class SignUpViewController: UIViewController {  
    //Outlets  
    @IBOutlet weak var firstNameText: UITextField!  
    @IBOutlet weak var lastNameText: UITextField!  
    @IBOutlet weak var emailText: UITextField!  
    @IBOutlet weak var passwordText: UITextField!  
    @IBOutlet weak var signUpButton: UIButton!  
    override func viewDidLoad() {  
        super.viewDidLoad()  
    }  
    @IBAction func signUpButtonTapped(_ sender: Any) {  
        guard let firstName = firstNameText.text,  
        let lastName = lastNameText.text,  
        let email = emailText.text,  
        let password = passwordText.text else { return }  
        Auth.auth().createUser(withEmail: email, password: password) { (authResult, error) in  
            if let error = error {  
                debugPrint("Error creating user: \(error.localizedDescription)")  
            }  
            let changeRequest = Auth.auth().currentUser?.createProfileChangeRequest()  
            changeRequest?.displayName = firstName  
            changeRequest?.commitChanges(completion: { (error) in  
                if let error = error {  
                    debugPrint(error.localizedDescription)  
                }  
        })  
            guard let userId = authResult?.user else { return }  
            Firestore.firestore().collection(USERS_REF).document(userId).setData([  
                USERNAME : firstName,  
                DATE_CREATED : FieldValue.serverTimestamp()  
                ], completion: { (error) in  
                    if let error = error {  
                        debugPrint(error.localizedDescription)  
                    } else {  
                        self.dismiss(animated: true, completion: nil)  
                    }  
            })  
        }  

    }  
} 

I'm getting the error:

Cannot invoke 'setData' with an argument list of type '([String : Any], completion: ((Error?) -> Void)?)' (line 30)


Does anyone know what this means and how I can troubleshoot it?