param checking for switchLED function