Where did that happen? I used to drive a Plymouth Sundance which had a weird problem. Every once in a while, the driver's side headlight would go out. If I banged on the side of the car right next to the headlight, it would go on again ... usually.
Well, that happened once in Bucks County, PA on Xmas Eve several years ago. I was speeding home around midnight after partying at a friend's house and a cop pulled me over. I was also catching a cold. He told me my headlight was out, wished me a nice holiday, told me to drink some hot tea with honey, and didn't even comment on my speeding. Go figure!
Then several months later, the same thing happened on Delaware Ave. in Philly. Just as I was about ready to get onto I95 North, a Philly cop pulled me over and he must have been in a very crappy mood. I explained the situation and he yelled at me at the top of his lungs that he didn't give a poo, then he got back in his cop car and drove away. No ticket.
I finally got rid of that car because after having it looked at many times for the same problem, it was never fixed.