driver-core/src/main/com/mongodb/client/model/changestream/ChangeStreamDocument.java
@BsonIgnore @Nullable
    public MongoNamespace getNamespace() {
        if (namespaceDocument == null) {
            return null;
        }
        if (!namespaceDocument.containsKey("db") || !namespaceDocument.containsKey("coll")) {
            return null;
        }

        return new MongoNamespace(namespaceDocument.getString("db").getValue(), namespaceDocument.getString("coll").getValue());
    }
@BsonIgnore @Nullable
    public MongoNamespace getNamespace() {
        if (namespaceDocument == null) {
            return null;
        }
        if (!namespaceDocument.containsKey("db") || !namespaceDocument.containsKey("coll")) {
            return null;
        }

        return new MongoNamespace(namespaceDocument.getString("db").getValue(), namespaceDocument.getString("coll").getValue());
    }
Returns the namespace

The invalidate operation type does include a MongoNamespace in the ChangeStreamDocument response. The
dropDatabase operation type includes a MongoNamespace, but does not include a collection name as part
of the namespace.

@return the namespace. If the namespaceDocument is null or if it is missing either the 'db' or 'coll' keys,
then this will return null.