public static boolean validateChannel(String channel){
  try {
    return channel.matches("(?i)^#{0,1}" + USERNAME_REGEX + "$");
  }
 catch (  PatternSyntaxException|NullPointerException ex) {
    return false;
  }
}

public static boolean validateChannel ( String channel ) { try { return channel . matches ( "(?i)^#{0,1}" + USERNAME_REGEX + "$" ) ; } catch ( PatternSyntaxException | NullPointerException ex ) { return false ; } }
kind of relaxed valiadation if a channel , which can have a leading # or not .
