mongodb find if field exists or if null code example
Example: mongodb exists and not null
db.collection1.find({ 'fieldname1' : { $exists: true, $ne: null } });
db.collection1.find({ 'fieldname1' : { $exists: true, $ne: null } });