ensure that host is set if it exists even if undef