Checks if the given input is a hex string.
The input to be checked.
Optional
If true, the function also checks if the hex is of even length (padded hex).
Returns true if the input is a hex string, false otherwise.
Checks if the given input is a hex string.