what can be the cause of an check engine light? How can I check? on 2000 BMW 328i

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
My car has only 79k miles on it. The dealer said that the sensor might be contaminated by oil, but its not even wet with oil.
(1) Answer
This car has literally hundreds of codes for the check engine light and there are dozens of sensors, not just one that can get oily. So, best to have a good German car shop look at your BMW, this car has more than 30 computers, So unless your are trained, don't mess with it or guess by trying parts. Doing that can ruin things and get very,very expensive!