CSHARP-509: Check for null keys.