Fix IP resolution (bnc#867357)

If the host ip address is not resolved, return `nil` for host