checks lower case envvar, then upper on keyerror.