added method for checking for valid branch names