avoid IndexError when empty host argument is given

When the host argument passed to __inint__ is an empty string, tryping to access host[-1] raises an IndexError.
As an empty hostname is not valid anyway, a ValueError with an according error meassage is raised instead.