An optical mouse consists of CMOS sensors and LEDs that are not harmful unless specified as a class 2 laser device. In general, all of the optical mice are class 1 devices, which are not dangerous. Even if you don’t see a class-indicating label, you can assume it’s safe.