Given the following stack trace:
MESSAGE: Value cannot be null.Parameter name: key SOURCE: mscorlib TARGETSITE:
It looks more like that your IDictionary argument has an item with a Key parameter which is null.
IDictionary
Key
The parameter checking for the IDictionary will probably be happening somewhere internally in the framework.