checks for invalid ips/ports