There are no standards for lpstat behavior - mine simply reports an error. Yours seems to do interesting things, so let's investigate before we can answer your question.
Run your lpstat command from the prompt.
Next echo $?
Example
Code:
> lpstat -ppfs39p07
qstatus: (WARNING): 0781-102 Invalid printer name: pfs39p07.
Queue Dev Status Job Files User PP % Blks Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- -- -----
xerox @DDCM READY
xerox xerox READY
> echo $?
1
echo $? should produce a non-zero value (return code) on errors or warnings.
Is that what you see?
If that is the case, then you can use $? to have your code ignore any text output.