Add branch check