public static void DisposeNullSafe(this IDisposable x)
 {
     x.DoIfNotNull(y => y.Dispose());
 }