TEIID-2441 adding better error handling and well-formed arguments to the
char/byte conversions