Changes in the optical characteristics of the sensor 118 caused by the presence of the target gas are thus detected and if a hazardous condition exists a response is made by the system such as an alarm being sounded or other suitable response action, such as the closing of a safety shutoff valve.