check environment variable for api key