Just for curiosity/convenience: C# provides two cool conditional expression features I know of:
string trimmed = (input == null) ? null : input.Trim();
Currently we can only write an extension method if you don't want to repeat yourself, I'm afraid.
public static string NullableTrim(this string s) { return s == null ? null : s.Trim(); }