code: private boolean isElementPresentJavaXPath() throws Exception {
  		String xpath = ((StringLocatorAwareBy)getByLocator()).getLocator();
  		try {
  			xpath = formatXPathForJavaXPath(xpath);
  			NodeList nodes = getNodeListUsingJavaXPath(xpath);
  			if (nodes.getLength() > 0) {
  				return true;
  			} else {
  				return false;
  			}
  		} catch (Exception e) {
  			throw new Exception("Error performing isElement present using Java XPath: " + xpath, e);
  		}
  	}
docs: Use the Java Xpath API to determine if the element is present or not
  
  @return boolean true or false as the case is
  @throws Exception