Ensure that branch name is a string before chomping