Declare your variable in the beginning of your script if you know you're gonna test it later. Don't give it a value at this point. A declared variable that has not been assigned a value will have the value 'null'. Use the === compare operator to check whether the variable is really boolean false. The == operator is not reliable as a value of 0 will also evaluate to false. (Basically, the === asks whether variable are of same value AND datatype!).
Nitrogen Fixation. Nitrogen fixation refers to the conversion of atmospheric nitrogen gas (N 2 ) into a form usable by plants and other organisms. Nitrogen fixation is conducted by a variety of bacteria, both as free-living organisms and in symbiotic association with plants. Because it is the principal source of the nitrogen in the soil, nitrogen that plants need to grow, nitrogen fixation is one of the most important biochemical processes on Earth.
Other plants benefit from N-fixing bacteria when the bacteria die and release nitrogen to the environment, or when the bacteria live in close association with the plant. In legumes and a few other plants, the bacteria live in small growths on the roots called nodules. Within these nodules, nitrogen fixation is done by the bacteria, and the NH3 they produce is absorbed by the plant. Nitrogen fixation by legumes is a partnership between a bacterium and a plant. Biological nitrogen fixation can take many forms in nature, including blue-green algae (a bacterium), lichens, and free-living soil bacteria.