Add a check for the required environment variables