With Behavior Trees, you can prevent a task or other node from running by using a Decorator.

Due to how BT sequences work, this causes the whole parent sequence to abort. If you instead want the sequence to just skip over the node instead of aborting everything, use the Force Success decorator in addition to the decorator that checks your condition.