and replace GetBoolArg with IsArgSet as we only want
to know if the arg is passed; we do not need the value.
This is a backport of Core PR18594 [4/6]
https://github.com/bitcoin/bitcoin/pull/18594/commits/afce85eb994384246e455b766549c3206cb059e0
Depends on D9239