EnvironmentvariableAdapter (legacy) NPE fix.