A person is guilty of criminal possession of a controlled substance in the seventh degree when he or she knowingly and unlawfully possesses a controlled substance; provided, however, that it shall not be a violation of this section when a person possesses a residual amount of a controlled substance and that residual amount is in or on a hypodermic syringe or hypodermic needle ; nor shall it be a violation of this section when a person's unlawful possession of a controlled substance is discovered