Fixed check for env vars. os.getenv does not return bool