code: private Element grabMathElement(Element formulaNode) throws XPathExpressionException, MathConverterException {
          Element mathEle = Optional.ofNullable((Element) XMLHelper.getElementB(formulaNode, xPath.compile("./*[1]")))
                  .orElseThrow(() -> new MathConverterException("no math element found"));
          // check for the "math" root element
          if (mathEle.getNodeName().toLowerCase().contains("math")) {
              // no math element present
              return mathEle;
          }
          throw new MathConverterException("no math element found");
      }
docs: Tries to get the math element which should be next child
  following the formula node.
  
  @param formulaNode formula element
  @return the subsequent math element
  @throws XPathExpressionException should not happen or code error
  @throws MathConverterException   math element not found