Simpler tests for IPv4/IPv6 validity