<PackageReference Include="Google.Protobuf" Version="3.35.1" />

Google.Protobuf.ProtoPreconditions

public static class ProtoPreconditions
Helper methods for throwing exceptions when preconditions are not met.
public static T CheckNotNull<T>(T value, string name)

Throws an ArgumentNullException if the given value is null, otherwise return the value to the caller.