title: C# Nullable Annotation that method returns not null if parameter is not null
body: <p>How can I tell compiler that the following extension method returns not null if input is not null?</p>
  <pre class="lang-cs prettyprint-override"><code>public static string? SomeMethod(this string? input)
  {
      if (string.IsNullOrEmpty(input))
          return input;
  
      // Do some work on non-empty input
      return input.Replace(&quot; &quot;, &quot;&quot;);
  }
  </code></pre>