Fixed env var checker code to not break when env vars are not set
properly