Added environment variable checking if nil and for true/false values