title: $add with some fields as Null returning sum value as Null
body: <p>These are the documents in my collection</p>
  
  <pre><code>{ "_id" : 1, "quizzes" : [ 10, 6, 7 ], "labs" : [ 5, 8 ], "final" : 80, "midterm" : 75 ,"extraMarks":10}
  { "_id" : 2, "quizzes" : [ 9, 10 ], "labs" : [ 8, 8 ], "final" : 95, "midterm" : 80 }
  { "_id" : 3, "quizzes" : [ 4, 5, 5 ], "labs" : [ 6, 5 ], "final" : 78, "midterm" : 70 }
  </code></pre>
  
  <p>Only Document 1 has a field extra marks:</p>
  
  <p>Now i have to make a projection as a sum of "final"+"midterm"+"extraMarks"</p>
  
  <p>I have written a query for projection as follows:</p>
  
  <pre><code>db.students.aggregate([    {      $project: {          examTotal: { $add: [ "$final", "$midterm","$extraMarks" ] }      }    } ])
  </code></pre>
  
  <p>This query is giving me correct result for Document1 and for Doc2 and Doc3, as the field doesnt exist its giving sum as null.</p>
  
  <p>Is it possible to check if the field is not null and add in the query itself..Any suggestions for this?</p>
  
  <p>Is there any functionality similar to nvl (in SQL) in the queries Mongo DB?</p>