Trying to handle an exception as flow control is a bad idea here. See for an explanation why that is: Why not use exceptions as regular flow of control?
So instead of handling the exception that you get when uid is null or empty, check whether it has a value first and then only call the Firestore API with it if it has a value. For example:
if !(uid ?? "").isEmpty { Firestore.firestore().collection("users") .document(uid) .collection("user-convo") ... } There is no specific operation to check whether a collection exists.
Instead collection is comes into existence when you add the first document to it, and disappears when you remove the last document from it.
So to check whether a collection exists, the simplest way is to try and read a single document from it.
Firestore.firestore().collection("users") .document("theUID") .collection("user-convo") .limit(to: 1) // 👈 .getDocuments { snapshot, _ in if !snapshot!.isEmpty ... // 👈 }