helper: Make unhexify() robust on invalid data