Is there a possibility to wire a safety switch to the lid,

Is there a possibility to wire a safety switch to the lid, that turns off the laser?
If not for the original control board, can you add one that works with a smoothieboard?
Thank you for your replies!

Just add in a N/O limit switch in series with the Laser switch

Thank you!