x509: Use explicit has_value on optionals

In the last patch not all such cases were caught.
We should clean them all up by now.

Signed-off-by: Xiangfei Ding <xfding@google.com>
Change-Id: I1705878afa53a02b0c33b446aa4aa0b56a6a6964
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/94867
Presubmit-BoringSSL-Verified: boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/x509/policy.cc b/crypto/x509/policy.cc
index 4a6de72..0ab3754 100644
--- a/crypto/x509/policy.cc
+++ b/crypto/x509/policy.cc
@@ -337,7 +337,7 @@
             continue;
           }
           auto new_node = X509PolicyNode::Create(mapping->issuerDomainPolicy);
-          if (!new_node) {
+          if (!new_node.has_value()) {
             return std::nullopt;
           }
           new_node->mapped = true;
@@ -406,7 +406,7 @@
     if (next_nodes.empty() || OBJ_cmp(next_nodes.back().policy.get(),
                                       mapping->subjectDomainPolicy) != 0) {
       auto new_node = X509PolicyNode::Create(mapping->subjectDomainPolicy);
-      if (!new_node || !next_nodes.Push(*std::move(new_node))) {
+      if (!new_node.has_value() || !next_nodes.Push(*std::move(new_node))) {
         return std::nullopt;
       }
     }