allow schema in mongoose to store null values code example
Example: mongoose nullable
var userSchema = new mongoose.Schema({
name: {type: String, required: true},
preferences: {type : { preference1 : String, preference2 : String}, default : null}
});