https://dotnetfiddle.net/rB8FPD
In the following code, the Requires.NotNull call displays a warning

The Requires.NotNull function should accept values of type T? instead of T
#nullable enable
using System;
using Microsoft;
public class Program
{
public static void Main()
{
Console.WriteLine("Hello World");
Foo? str = null;
Requires.NotNull(str, "");
}
private class Foo {
}
}
https://dotnetfiddle.net/rB8FPD
In the following code, the Requires.NotNull call displays a warning
The
Requires.NotNullfunction should accept values of typeT?instead ofT