<!-- This issue tracker is only for technical issues related to Bitcoin Core.

General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com.

For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.

If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

<!-- Describe the issue -->

**Expected behavior**

When I make a json-rpc call to `getblock` with:

```json
{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "getblock",
    "params": ["37351c7060ec3a149af1bbc9ebcc436c0ee652f96559ef1fe9bc45d11000f061", "2"]
}
```
An error should be returned with the [expected data type](https://developer.bitcoin.org/reference/rpc/getblock.html#argument-2-verbosity)(number) for `verbosity`.
<!--- What behavior did you expect? -->

**Actual behavior**

<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

Received `"message": "JSON value is not a boolean as expected"` as an error message which is not the [expected data type](number) (https://developer.bitcoin.org/reference/rpc/getblock.html#argument-2-verbosity) for `verbosity`

**To reproduce**

Use this curl on a node

```
curl --location --request POST "127.0.0.1:8332" \
--header "Content-Type: application/json" \
--header "Authorization: Basic YOUR_AUTH" \
--data "{
    \"jsonrpc\": \"1.0\",
    \"id\": \"curltest\",
    \"method\": \"getblock\",
    \"params\": [\"37351c7060ec3a149af1bbc9ebcc436c0ee652f96559ef1fe9bc45d11000f061\", \"2\"]
}"
```

**System information**
* self-compiled

<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->

<!-- Any extra information that might be useful in the debugging process. -->
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

{
                                {RPCResult::Type::STR, "type", "one of \"buried\", \"bip9\""},
                                {RPCResult::Type::OBJ, "bip9", "status of bip9 softforks (only for \"bip9\" type)",
                                {
                                    {RPCResult::Type::STR, "status", "one of \"defined\", \"started\", \"locked_in\", \"active\", \"failed\""},
                                    {RPCResult::Type::NUM, "bit", "the bit (0-28) in the block version field used to signal this softfork (only for \"started\" status)"},
                                    {RPCResult::Type::NUM_TIME, "start_time", "the minimum median time past of a block at which the bit gains its meaning"},
                                    {RPCResult::Type::NUM_TIME, "timeout", "the median time past of a block at which the deployment is considered failed if not yet locked in"},
                                    {RPCResult::Type::NUM, "since", "height of the first block to which the status applies"},
                                    {RPCResult::Type::NUM, "min_activation_height", "minimum height of blocks for which the rules may be enforced"},
                                    {RPCResult::Type::OBJ, "statistics", "numeric statistics about BIP9 signalling for a softfork (only for \"started\" status)",
                                    {
                                        {RPCResult::Type::NUM, "period", "the length in blocks of the BIP9 signalling period"},
                                        {RPCResult::Type::NUM, "threshold", "the number of blocks with the version bit set required to activate the feature"},
                                        {RPCResult::Type::NUM, "elapsed", "the number of blocks elapsed since the beginning of the current period"},
                                        {RPCResult::Type::NUM, "count", "the number of blocks with the version bit set in the current period"},
                                        {RPCResult::Type::BOOL, "possible", "returns false if there are not enough blocks left in this period to pass activation threshold"},
                                    }},
                                }},
                                {RPCResult::Type::NUM, "height", "height of the first block which the rules are or will be enforced (only for \"buried\" type, or \"bip9\" type with \"active\" status)"},
                                {RPCResult::Type::BOOL, "active", "true if the rules are enforced for the mempool and the next block"},
                            }},
                        }},
                        {RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
                    }},
                RPCExamples{
                    HelpExampleCli("getblockchaininfo", "")
            + HelpExampleRpc("getblockchaininfo", "")
                },
        [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue