if(string.IsNullOrWhiteSpace(stringToCheck) == true){ //do thing if empty, whitespace, or null }else{ //do thing if contains value }