LEDs may be diodes, but they are not designed to work with reverse polarity. It can cause metal migration, etc in the LED and lead to failure.
Any decent bulb replacement LEDs will have at the very least a diode or bridge inside them… some really crappy ones do not. Nice regulated G4 halogen replacements for cheap