Contamination sensor