safely check for keys on the env object