Well you just want to avoid getting into the whack-a-hole game.  You basically need to make sure that no valid Python object in `left` and `right` can cause an unhandled exception in that expression.  I'm not that familiar with the workings of `np.isscalar`, but the point is more that you can use duck typing to ask "does this test give a boolean result without giving an exception, if so we'll go ahead and trust the result".