Fix NPE on getting environment variables
Merge pull request #432 from dlsniper/fix-431

Fix NPE on getting environment variables (fixes #431)