Validate HTTP API user input

For example, raft indices must be sane integers.
I really don't like how these functions are set up. Either you have a value and you want to validate that it is bool-like, or you don't need to do the validation. This function, along with `parseUint64` is now somewhat nebulous as to what it really means. Could you just not call parseX in the event that values aren't set?