Avoid useless connection attempts if host is empty