I want to extend MattMitchell's answer by saying you can create an extension method for this functionality:
public static IsEmptyOrWhitespace(this string value) {
return String.IsEmptyOrWhitespace(value);
}
This makes it possible to call:
string strValue;
if (strValue.IsEmptyOrWhitespace())
// do stuff
To me this is a lot cleaner than calling the static String
function, while still being NullReference safe!