I think this statement is sloppy, so you are making a good point. What is should be said is that either the lines are perpendicular, for which the test is
$a+b=0$,
or the lines are not perpendicular, in which case the smaller of the two angles made by the two intersecting lines is given by the formula you give.