Add helper function for determining IPv6