I tried this in next-usequerystate, to have non-null states when a default value is provided as an argument. Gave up on generics after a couple of iterations, my 2 cents would be: use overloads. There's a bit of trial-and-error at what order makes it all click, but it's much simpler (and more declarative) than a gigantic generics state machine. Plus, as a bonus, every overload can have custom documentation!