In theory the pilot in command (the Captain) has responsibility for making sure everything works before flight. On small aircraft responsible pilots always check all instruments and sensors. For example, a pitot tube will be checked to make sure that it is clear and that no spider or mud wasp has taken up residence therein. Another key check is to make sure the antennas are all there and firmly attached. Most checklists have at bare minimum an "instruments" line item and may have many line items for specific instruments. When a pilot does the "walk around" they will specifically examine each and every external sensor such as static ports, etc.
Unfortunately, commercial pilots rarely have time to do such thorough checks, which can be very time consuming for a large aircraft. In many cases they will often not even do a walk around, even if their airline's policy mandates it.