check to make sure host is not null for httpclient