sanitize serial value