(a) Before searching a person, a person's premises, or a person's vehicle, a law enforcement officer may ask the person whether the person is in possession of a hypodermic needle or other sharp object that may cut or puncture the officer, or whether a hypodermic needle or other sharp object is on the premises or in the vehicle to be searched. If there is a hypodermic needle or other sharp object on the person, on the person's premises, or in the person's vehicle, and the person alerts the law enforcement officer of such before the search, the person shall not be charged with or prosecuted for possession of drug paraphernalia for the hypodermic needle or other sharp object.
(b) Subsection (a) does not apply to any other drug paraphernalia that may be present and found during the search.