Target exception type when checking for environ variable in settings