Allow zero length strings to be passed to valid_hex