As has been said, you can t do this with the ?? operator (well, not without some contortions that don t seem to fit with your aim of making this cleaner).
When I see this pattern emerging I immediately think of Enforcements. Originally from the C++ world they transfer to C# pretty well, although are arguably less important most of the time.
The idea is that you take something of the form:
if( condition )
{
throw Exception;
}
and converts it to:
Enforce<Exception>( condition );
(you can further simplify by defaulting the exception type).
Taking it further you can write a set of Nunit-style methods for different condition checks, e.g.;
Enforce<Exception>.NotNull( obj );
Enforce<Exception>.Equal( actual, expected );
Enforce<Exception>.NotEqual( actual, expected );
etc.
Or, better still by providing an expectation lamba:
Enforce<Exception>( actual, expectation );
What s really neat is that, once you ve done that, you can return the the actual param and enforce inline:
return Enforce( command.ExecuteScalar() as Int32?, (o) => o.HasValue ).Value;
... and this seems to be the closest to what you re after.
I ve knocked up an implementation of this before. There s a couple of little niggles, like how you generically create an exception object that takes arguments - some choices there (I chose reflection at the time, but passing a factory in as an extra parameter may be even better). But in general it s all pretty straightforward and can really clean up a lot of code.
It s on my list of things to do to knock up an open source implementation.