Is my washer lid switch bad?

Kenmore clothes washer runs fine until spin cycle. It starts to spin and then kicks off, then starts again and then off. Finally I put a big bottle of laundry soap on the lid by the switch and it runs fine.
I just wonder if before I change the switch should I check anything else like maybe an adjustment?