where T : System.ValueType?
I think the example below covers a lot of use cases that one would expect from ValueType. The parameter type of T? allows nullables, and the type constraints restrict it to structs that implement IFormattable which is true for the common value types I can think of.
public void foo(T? a) where T : struct, IFormattable
Note that this allows types such as decimal, datetime, timespan.
https://docs.microsoft.com/en-us/dotnet/api/system.iformattable?view=netcore-3.1