MongoDB 3.2 $ifNull with Validator
As you have noticed, right now this kind of "validation" is not possible in the mongodb. However, there is feature request open for such feature. If you give your 'vote' for it, maybe they make this feature. ;-)

Currently, the easiest way to archive that is do check (like that) in your application, just before inserting (or updating) document.