code: public static ExpectedCondition<Boolean> clickCanBeDoneWithoutAlertOnElement(final WebElement element) {
          return new ExpectedCondition<Boolean>() {
  
              /**
               * {@inheritDoc}
               */
              @Override
              public Boolean apply(@Nullable WebDriver driver) {
                  try {
                      element.click();
                      return true;
                  } catch (UnhandledAlertException e) {
                      driver.switchTo().alert().dismiss();
                  } catch (ElementNotVisibleException e) {
                  }
                  return false;
              }
          };
      }
docs: Click can be done without alert on Element.
  
  @param element
  is target WebElement.
  @return true or false