I don't want mongodb to create a date/time field, if i am passing a null value, the code below works for all non-date types but fails for the date type. It creates a date/time field with a null value instead. This is a code snippet of my bsondocument below

```
   {"stringfield", stringfield= string.IsNullOrWhiteSpace(stringfield)?null:stringfield},
   {"datetime", datetime.HasValue == false ?null:datetime}

```

Note: I am not making use of any classes to map mongodb fields to properties, rather directly creating a bsondocument and inserting that document in mongodb.

I tried using the Convention pack with the following code below, but i guess that applies only when i create classes to map mongofields to properties?

```
        var pack = new ConventionPack();
        var ignoreIfNull = new IgnoreIfNullConvention(true);
        pack.Add(ignoreIfNull);
        ConventionRegistry.Register("ignoreNulls", pack, t => true);

```