static boolean isValidIfPresent(@Nullable String email) {
    return isEmpty(email) || isValidEmail(email);
  }
@Test
  public void various_examples_of_invalid_emails() {
    assertThat(isValidIfPresent("infosonarsource.com")).isFalse();
    assertThat(isValidIfPresent("info@.sonarsource.com")).isFalse();
    assertThat(isValidIfPresent("info\"@.sonarsource.com")).isFalse();
  }