Detecting contaminants