scripting/samba_upgradedns: Only look for IPv4/IPv6 addresses if we actually them