Fix an ArgumentError exception when searching for an invalid IP address. Also allow searching for multiple subnets at once.