Database
[{"firstName":"name","lastName":"name","address":"some address",id:1},{"firstName":"name2","lastName":null,"address":"some address2",id:2},{"firstName":"name3","address":"some address3",id:3},{"address":"some address4",id:4},{"firstName":"name5","lastName":"name","address":null,id:5},{"firstName":"name6","lastName":"name6",id:6},{"firstName":"name7","lastName":"name7","address":"some address7",id:7}]
Query
db.collection.aggregate([{$addFields:{confirmed:{$cond:[{$and:[{$eq:[{$type:"$firstName"},"string"]},{$eq:[{$type:"$lastName"},"string"]},{$eq:[{$type:"$address"},"string"]}]},true,false]}}},{$sort:{confirmed:-1}}])