Make more specific tests when checking exceptions

When checking ArgumentNullExceptions it is more specific to check for
string equality on the ParamName attribute instead of checking for
substrings in the message.
In case you follow the old pattern and have an argument called "name"
you could detect the wrong ArgumentNullException since the "name" is
part of the standard message anyway.