Composes an InetAddress from a family and address. Validates and converts the family to ensure it is 4, 6, or null.
The IP family, either as a string ('IPv4', 'IPv6'), number (4, 6), or null for unknown.
The IP address string.
An InetAddress object.
If the family is not valid (not 'IPv4'/'IPv6' or 4/6 or null).
Composes an InetAddress from a family and address. Validates and converts the family to ensure it is 4, 6, or null.