Magnet/metal detection