This patch transforms: X && *X == Y to: X == Y where X is of std::optional<T>, and Y is of T or similar.