Check if IP is v4 or v6