Fix use of ThrowIf where the arguments were reversed
#20052
Merged
ThrowIf where the arguments were reversed
#20052