On one of my old Tiger 955i I had to clean the switch every so often because road dirt would stop plunger coming out so the bike would cut out when I put her in gear thinking the stand was still down. That's the only problem I've had with one.
Pull the 2 wires off the switch and twist them together. But make sure you cut them at the switch on the side stand and not the plug end you will need the plug intact to plug in the new switch. Please dont do this for any other reason than get you home, it will hurt a lot if you forget the side stand and ride off
The spring on one of my bikes sometimes doesn't bring the side stand back far enough due to it weakening from use. A simple job to replace when I get time.
Another solution is to buy an off the shelf NO (Normally Open) magnetic reed switch, wire that in and attach the magnet to the stand and position the new switch so the magnet operates the reed, there are many ones suitable on eBay, a bit of drill and tapping and crimp connectors, could be sorted and trouble free within a couple of hours,
What I do is make a short piece of wire up with the same type connectors, IE, bullet type or spade type, and carry this either in my jacket pocket as in my case as I have more than one bike, or just pop it under your seat. If you have a problem with the switch just disconnect the switch and plug in your piece of wire to bypass it.
Also. I have done this in the past when my electric cooling fan switch went faulty.
MUST STRESS Only do this as a temporary get home hack, and replace the switch ASAP.