Biquad and polarity flipping
A filter will not flip the polarity for all input signals. It might flip it for certain input frequencies, namely for the ones for which the filter's phase response equals $\pi+2k\pi$. The way to check if your filter flips the polarity of a relevant input signal (i.e., for a certain frequency), you have to evaluate the frequency response at that frequency. For a low pass filter you can check the filter's behavior at DC (i.e., frequency zero):

$$H(1)=\frac{b_0+b_1+b_2}{1+a_1+a_2}\tag{1}$$

You want this value to be positive. For a high pass filter you may want to check the frequency response at Nyquist:

$$H(-1)=\frac{b_0-b_1+b_2}{1-a_1+a_2}\tag{2}$$

And for a band pass filter you should check the frequency response at the center frequency.

In sum, a non-trivial filter will not flip the sign for all input frequencies, it might flip it for specific frequencies. Depending on the filter type, there are certain prominent frequencies (e.g., DC or Nyquist) that you need to check.

EDIT:

It is straightforward to show that checking the sign of $b_0$ is not sufficient. Take the coefficients


b = [0.13111  -0.26221  -0.13111];
a = [1.00000  -0.74779   0.27221];


We have $b_0&gt;0$, but the frequency response at DC is

$$H(1)=-0.5$$

and so the sign of a constant input signal will be flipped (as soon as the transients have died out):