detailed embodiments will now be described with reference to the accompanying drawings . this invention may , however , be embodied in many different forms and should not be construed as limited to the detailed embodiments set forth herein ; rather , these embodiments are provided for thoroughness and completeness , and fully convey the scope of the invention to the skilled person . fig1 schematically illustrates a lamp device 1 in accordance with a first embodiment . the lamp device 1 comprises a housing 2 . at least a part of the housing 2 is light - transparent . the housing 2 is made of an electrically insulting material . the housing 2 may for example be made of glass or transparent / translucent plastics . the housing 2 is provided with a cylindrical shape . however , other shapes are also possible . for example the housing 2 may present a triangular cross section , a rectangular cross section or some other polygonal cross section . the lamp device 1 comprises a lighting module 3 . the lighting module 3 includes an led driver 3 a and a led module 3 b . the led driver 3 a includes circuitry for driving the led module 3 b which per se is well - known in the art . the led module 3 b includes one or more leds . the one or more leds may be inorganic leds , oleds or another type of solid state light source . although the lighting module 3 of the present embodiment includes an led module 3 b the lighting module can also include other types of light sources such as an incandescent lamp , a fluorescent lamp or an hid lamp . the lighting module 3 comprises a first and a second terminal 4 a , 4 b . the lamp device 1 comprises a first pair of electrical connection pins 5 aa , 5 ab and a second pair of electrical connection pins 5 ba , 5 bb ( commonly referenced ‘ pins 5 ’). the first pair 5 aa , 5 ab is arranged at a first end of the housing 2 . the second pair 5 ba , 5 bb is arranged at a second end of the housing 2 , opposite to the first end of the housing 2 . the pins 5 extend through the respective ends of the housing 2 and are hence accessible external to the housing 2 . the pins 5 hence form external pins 5 . the spatial configuration of the pins 5 is rigid . more specifically the pins 5 on each side maintain a fixed spacing and relative orientation . the pins 5 are arranged to be connected to an electrical socket of a lighting fixture for receiving a supply voltage . the first terminal 4 a is connected to the pin 5 aa via a switch 6 . the second terminal 4 b is connected to the pin 5 ba . as will be explained in more detail below the circuit between the pin 5 aa and the first terminal 4 a is open unless the lamp device 1 is correctly inserted to a lighting fixture . the circuit formed between the pin 5 ba and the second terminal 4 b is however closed independent of a connection state between the device 1 and a lighting fixture . the switch 6 of the lamp device 1 is operable to connect the pin 5 aa to the terminal 4 a of the lighting module 3 . the state of the switch 6 is controlled by a control circuit 7 described in detail below . the control circuit 7 comprises first and second inputs connected to the first pair of pins 5 aa , 5 ab . the control circuit 7 comprises a third input connected to a circuit element 8 . in the present embodiment the circuit element 8 takes the form of an optocoupler 8 . the primary side , i . e . the light emitter , of the optocoupler 8 is connected to the second pair of pins 5 ba , 5 bb . the secondary side , i . e . the photosensor , is connected to the third input of the control circuit 7 . the control circuit 7 is connected to the first pair of pins 5 aa , 5 ab via a rectifier 9 . similarly , the optocoupler 8 is connected to the second pair of pins 5 ba , 5 bb via a rectifier 10 . fig2 illustrates a first circuit implementation for the lamp device 1 . the control circuit 7 comprises a switch controller 7 ′. the switch controller 7 ′ is arranged to close the switch 6 in response to a voltage difference between its terminals exceeding a threshold voltage . as illustrated , the switch 6 and the switch controller 7 ′ may be included in a same circuit element forming a relay . the relay may be of a type known per se , such as an electromechanical , an electromagnetic ( e . g ., reed relay ), electro - thermal ( e . g ., bimetal ) or a solid - state type . the actual value of the threshold voltage may vary between different scenarios and for different lighting fixtures . in the present embodiment the threshold voltage is a voltage sufficient for causing the switch controller 7 ′ to close the switch 6 . in some examples the threshold voltage may be zero wherein the switch controller 7 ′ is arranged to close the switch 6 in response to a non - zero voltage difference between its terminals . the switch controller 7 ′ is connected to the rectifier 9 via a transistor q 1 . the base of the transistor q 1 is connected to the output of the optocoupler 8 . although q 1 is illustrated as a bipolar junction transistor ( bjt ) other types of transistors may also be used such as metal - oxide - semiconductor field - effect transistors ( mosfets ) or junction gate field - effect transistors ( jfets ). if a voltage is applied only at the first pair of pins 5 aa , 5 ab , the transistor q 1 will be turned off . there will be no current for driving the primary side of the optocoupler 8 and inducing a current in the secondary side of the optocoupler 8 . thus no control signal may flow from the optocoupler 8 , through the resistor r 2 and into the base of the transistor q 1 . the switch controller 7 ′ will hence not receive any current causing the switch 6 to close . no main current may hence flow from the pin 5 aa to the pin 5 ba . conversely , if a voltage is applied only at the second pair of pins 5 ba , 5 bb the control circuit 7 ′ will not receive a voltage sufficient for causing the switch 6 to close . if a first voltage sufficient for causing the control circuit 7 ′ to close the switch 6 ( i . e . a voltage exceeding a first threshold voltage ) is applied to the first pair of pins 5 aa , 5 ab and also a second voltage sufficient for causing the optocoupler 8 to provide a control signal to the transistor q 1 ( i . e . a voltage exceeding a second threshold voltage ) is applied to the second pair of pins 5 ba , 5 bb the control signal flowing through the resistor r 2 may turn on the transistor q 1 . the switch controller 7 ′ may then be powered by the first voltage from the first pair of pins 5 aa , 5 ab . if any of the first pair of pins 5 aa , 5 ab or the second pair of pins 5 ba , 5 bb become disconnected from the supply voltage there will not be a sufficient voltage difference for driving the switch controller 7 ′ or the optocoupler 8 , respectively . the switch 6 will then open and interrupt a current flow between the pin 5 aa and the pin 5 ba . hence , the control circuit 7 and the optocoupler 8 together form circuitry arranged to close the switch 6 on a condition that a voltage difference between the pins of the first pair 5 aa , 5 ab exceeds the first threshold voltage at a same time as a voltage difference between the pins of the second pair 5 ba , 5 bb exceeds the second threshold voltage . correspondingly , this circuitry is arranged to open the switch 6 on a condition that the voltage difference either between the pins of the first pair 5 aa , 5 ab or the pins of the second pair 5 ba , 5 bb falls below a respective threshold voltage . this implementation hence enables the lamp device 1 to be inserted and removed from a powered lighting fixture with a reduced risk of electrical shock if touching the pins at a free end of the lamp device 1 . as shown in fig2 , the rectifier 9 includes a capacitor c 1 for averaging the rectified ac voltage . also the rectifier 10 includes a capacitor for the same purpose . these capacitors provide a simple way to keep the switch from opening between half - cycles of the rectified ac voltage without the need to make specific adaption of the control circuit 7 . the lamp device 1 may be used in different types of lighting fixtures . as one example the lamp device 1 may be used to retrofit an existing lighting fixture for a fluorescent lamp , i . e . fluorescent tube . such a lighting fixture may , as known per - se , provide a driving voltage between the opposite ends of the fluorescent tube . it may further include a rapid start circuit which applies a heating voltage between the pins of each pair of connection pins of the fluorescent tube . the heating voltage may heat the filaments of the fluorescent tube . when the lamp device 1 is used in combination with such a lighting fixture the respective filament heating voltages are applied to the first pair of pins 5 aa , 5 ab and the second pairs of pins 5 ba , 5 bb . the state of the switch 6 may thus be controlled on the basis of the filament heating voltages . the respective filament heating voltages may be supplied to the lamp device 1 only when all pins 5 are correctly inserted into the lighting fixture . the lighting fixture may be arranged to apply the driving voltage to the pins 5 aa and 5 ba . a main current between these pins 5 aa and 5 ba may thus flow only when lamp device 1 is correctly inserted into the lighting fixture . fig3 illustrates a second circuit implementation for the lamp device 1 . the second implementation is similar to the first implementation but differs in that the control circuit 7 includes a power converter 11 . the power converter 11 is arranged to amplify a voltage received from the rectifier 9 to a level sufficient for closing the switch 6 . similar to the first circuit implementation the control circuit 7 includes an input for receiving the control signal from the optocoupler 8 . in fig3 the power converter 11 is an integrated circuit ( ic ) including an input for receiving the control signal from the optocoupler 8 . the power converter 11 may include circuit logic arranged to supply a voltage to the control circuit 7 ′ for closing the switch 6 on a condition that a voltage difference between the inputs of the power converter 11 exceeds a threshold voltage at a same time as a control signal is received at said input of the power converter 11 . the power converter 11 may provide a stable operating voltage for the switch controller 7 ′ under various operating conditions . this may be especially advantageous when the lamp device 1 is used to retrofit an existing lighting fixture as discussed above since different ballasts of the starting circuitry thereof may result in varying filament heating voltages . the power amplifier 11 may then amplify low heating voltages to a level sufficient for keeping the switch 6 closed . the power converter 11 may be implemented as a boost converter . an example circuit diagram for a boost converter comprising an inductor l 1 , a diode d 2 , a capacitor c 4 and a semiconductor switch in the form of a mosfet m 1 is shown in fig4 . the boost converter may be arranged to activate only on a condition that the control signal is received from the optocoupler 8 . the boost converter may for example include circuitry ( e . g . in the form of an ic ) arranged to receive the control signal from the optocoupler 8 and provide an enabling signal to the gate of the transistor m 1 only on a condition that the ic of the boost circuit receives the control signal from the optocoupler 8 . on a condition that no enabling signal is received by the transistor m 1 , the transistor m 1 assumes an off state wherein the boost converter will be inactive . in lighting fixtures it may occur that one of the contacts in the socket of the lighting fixture into which the lamp device 1 is inserted becomes loose . this may for example happen in older lighting fixtures due to wear and tear . as a result for example the pin 5 aa or 5 ab may lose electrical contact with the fixture . the lamp device 1 may then not operate correctly . with reference to fig3 , if for example the pin 5 aa loses the electrical contact with the lighting fixture the main current may flow through the pin 5 ab , the first output of the rectifier 9 , the power converter 11 , the switch controller 7 ′ and the switch 6 via the second output of the rectifier 9 . hence , despite the loose contact at the pin 5 aa the switch controller 7 ′ is powered wherein the switch 6 may be closed , the closing resulting in a further current increase . in response the voltage across the capacitor c 2 may increase . eventually the circuit may melt due to over voltage . to deal with this situation the lamp device 1 may be provided with an optional safety circuit . the safety circuit may be arranged between the rectifier 9 and the power converter 11 and be adapted to , in response to a voltage difference between the first and second outputs of the rectifier 9 exceeding a set threshold voltage ( i . e . a protection level ), clamping the voltage difference . fig4 illustrates an example implementation of such a safety circuit 12 in combination with the second circuit implementation illustrated in fig3 . it is however to be noted that the circuit 12 may also be used in combination with the first circuit implementation . to simplify understanding of the safety circuit 12 only the switch 6 , the switch controller 7 ′, the rectifier 9 and the power converter 11 are shown . in fig4 the power converter 11 is implemented as a boost converter . the remaining part of the circuit is identical to that of fig3 . the safety circuit 12 comprises a zener diode z 1 , a resistor r 3 , a capacitor c 3 , a thyristor t 1 and a diode d 1 . in the event of e . g . a loose contact at the pin 5 aa as described above the voltage over the capacitor c 2 will increase . however , in response to the voltage over the capacitor c 2 exceeding a threshold voltage set by the zener diode z 1 the thyristor t 1 will be triggered on . consequently , the main current will flow through d 1 and t 1 instead of through the power converter 11 and the switch controller 7 ′ and the voltage difference between the outputs of the rectifier 9 may be limited or clamped . by the switching on of the thyristor t 1 there is also provided a current path between the inputs of the power converter 11 . by choosing the impedances of d 1 and t 1 appropriately the voltage drop across d 1 and t 1 becomes sufficient for driving the power converter 11 and in turn the switch controller 7 ′. thereby , the lamp device 1 may produce light even if the pin 5 aa loses electrical contact with the lighting fixture . the safety circuit 12 may also be arranged between the rectifier 10 and the optocoupler 8 wherein the lamp may operate if for example the pin 5 ba loses electrical contact with the lighting fixture . in that case it may be advantageous to provide additional diodes in series with the diode d 1 to create a sufficient voltage drop for the optocoupler 8 to operate even if the pin 5 ba looses electrical contact . fig5 illustrates a safety circuit 12 ′ of an alternative design . the safety circuit 12 ′ is similar to the safety circuit 12 but differs in that instead of the diode d 1 and the thyristor t 1 , the safety circuit 12 ′ includes transistors q 2 , q 3 , q 4 and resistors r 4 , r 5 , r 6 . if the pin 5 aa loses its electrical contact with the lighting fixture , the voltage across c 2 will increase as explained above with reference to fig4 . when the voltage over c 2 exceeds the threshold voltage set by the zener diode z 1 , a current will flow into the base of q 2 wherein q 2 will switch on . as a result the base of q 4 will be pulled to ground wherein q 4 will switch off consequently , q 3 will turn off because the base current to q 3 will be interrupted by q 4 . the safety circuit 12 ′ is thus arranged to disconnect an output of the rectifier 9 from the power converter 11 and thus the control circuit in response to the voltage difference exceeding a set threshold voltage . fig6 schematically illustrates a lamp device 1 ′ in accordance with a second embodiment . the lamp device 1 ′ is similar to the lamp device 1 but differs in that instead of the optocoupler 8 the lamp device 1 ′ includes a current transformer 8 ′. the functions of the other parts of the lamp device 1 ′ are analogous to their counterparts in the lamp device 1 as described above . the primary winding of the current transformer 8 ′ is connected to the second pair of pins 5 ba , 5 bb . the secondary winding is connected to the input of the control circuit 7 via the rectifier 10 . the function of the current transformer 8 ′ is analogous to the function of the optocoupler 8 . an ac voltage applied at the primary winding of the current transformer 8 ′ via the second pair of pins 5 ba , 5 bb will induce an ac voltage in the secondary winding of the current transformer 8 ′. the induced ac voltage is rectified by the rectifier 10 and forms a control signal which is received by the control circuit 7 . as described in detail above the control circuit 7 will close the switch 6 on a condition that a voltage difference between the pins of the first pair 5 aa , 5 ab exceeds a threshold voltage at a same time as the control signal is received from the current transformer 8 ′. the person skilled in the art realizes that the present invention by no means is limited to the preferred embodiments described above . on the contrary , many modifications and variations are possible within the scope of the appended claims . for example , the optocoupler 8 and the current transformer 8 ′ both include a primary side and a secondary side which are galvanically insulated from each other . although this provides added safety other circuit elements which do not include insulation between a primary and secondary side may be used to generate a control signal to the control circuit 7 . a control signal may for example be provided to the control circuit 7 by a simple voltage divider or an operative amplifier connected to the second pair of pins . moreover , although the illustrated embodiments include certain circuit elements other types of circuit elements may also be used . for example a bjt may be replaced by a mosfet and vice versa . many of the circuit elements ( such as the zener diodes and the thyristors ) may also be replaced by integrated circuit counterparts including circuit logic providing a similar function as the circuit elements . furthermore , although the lamp devices 1 includes rectifiers 9 , 10 they may be omitted in case the lamp device 1 is used in a lighting fixture providing a dc voltage . additionally , variations to the disclosed embodiments can be understood and effected by the skilled person in practicing the claimed invention , from a study of the drawings , the disclosure , and the appended claims . in the claims , the word “ comprising ” does not exclude other elements or steps , and the indefinite article “ a ” or “ an ” does not exclude a plurality . the mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measured cannot be used to advantage .