Add empty string check for host.