Comparison sensors only signal if the blocks on either sensing end (pointed to on the other sides, and not visible here) are the same ID and metadata.
Standard Block Sensors
The standard and solid block sensors. Neither signals when it faces air. The standard block sensor, being built with a lighter wooden button, emits a signal when facing any non-air block, but the solid block sensor requires that it be facing a solid block.