A locking state detector comprises a magnet disposed at a first portion of a casing which has an opening that is lockable with an opening locking means. A detector is disposed at a second portion of the casing, the second portion being spaced apart from the first portion such that a clearance between the first and second portions is formed. An interfering component is fixed to an interfering component pivoting means, which is disposed in the opening locking means and arranged to pivot into the clearance and out of the clearance when the interfering component pivoting means is rotated. The detector is arranged to detect a locked state and a non-locked state of the opening locking means in cooperation with the magnet and the interfering component, and to indicate the detected state for subsequent processing.