firstOrNull
inline suspend fun <Document : Any> MongoAggregationPipeline<Document>.firstOrNull(): Document?(source)
Returns the first document found by this query, or returns null.
See also
Throw an exception instead of returning null.