Safety switch and trapped key interlock system