In toHex, if argument is null, return "".