Checked for null for getenv function