Sounds like a faulty or dirty opto receiver.
Definitely do a switch test - if it is an opto the switch should be normally closed but open when you break the opto beam if it is anything like my Dirty Harry.
You can clean the opto receiver with a cotton bud and some metho or similar.