It's because template arguments are after all positional arguments.
If nullCheck
was the second argument, you would have to specify T
first before you could specify nullCheck
.
The compiler can (informally) only try to infer the arguments to the right of the last positional argument, much like if they were default arguments.
Note this is the same as in C++ and reasonable if you think about it.