code: private static boolean isEmail(String account) {
  
          if (TextUtils.isEmpty(account)) {
              return false;
          }
  
          final Pattern emailPattern = Patterns.EMAIL_ADDRESS;
          final Matcher matcher = emailPattern.matcher(account);
          return matcher.matches();
      }
docs: Returns true if the given string is an email.