GTNCOMMON-17 NPE when decode a value encoded from latin character

Catch the exception when decoding wrong input and adding unitest