By analyzing the mass spectrum data of a sample gas obtained in the manner mentioned above, it is possible to inspect for the presence or absence of a mass spectrum which is characteristic of a dangerous substance, such as explosives, which might be present in the sample gas.