check branch existence