Fix NPE in HttpClientFactory.