Fixing str_to_hex when receiving the value 0, it was returning ''
instead of '0x0'