public BsonMemberMap SetIgnoreIfNull(bool ignoreIfNull) { if (_frozen) { ThrowFrozenException(); } if (ignoreIfNull && _ignoreIfDefault) { throw new InvalidOperationException("IgnoreIfDefault and IgnoreIfNull are mutually exclusive. Choose one or the other."); } _ignoreIfNull = ignoreIfNull; return this; }