Modern LED and electronically controlled lamps can be a harder but you can still check for basic faults. You may be able to bypass a faulty electronic control and add an in-line switch to the flex instead, though not if the same electronics is dropping the mains to a low voltage for a LED lamp.