title: checking of field in a document
body: <p>Let's say I have the following schema</p>
  
  <pre><code> var userSchema = new Schema({
      name : String
    });
  
    var User = mongoose.model('User',userSchema);
  </code></pre>
  
  <p><strong>EDIT</strong>: If an user trying to update field, that does not exists, I need throw exception. My question is how can I check that an updating field does not exists in the updating document. Here is a little example what I need:</p>
  
  <pre><code>  app.post('/user/update/:id', function (req, res) {
       var field = req.param('field'),
            value = req.param('value'),
            id = req.param('id');
  
       User.findOne({_id: id},function(err, user){
          if(err) throw err;
  
          if (user) {
  
            user[field] = value;          // Here is I need to check that field is exists
                                          // in user schema. If does't I have to throw 
                                          // an execption.
  
            user.save(function (err){
               return res.send(200);
            });
          }            
       })
    });
  </code></pre>