Like the second link shows you can use this from MEPover package:
If the result is an empty list or only a single element then the pipes is not connected on both sides.
Alternatively you could change the python code a bit like this, so you will end up wil a list of booleans indicating whether or not the connectors are connected or not:
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
if isinstance(IN, list):
curves = UnwrapElement(IN)
curves = [UnwrapElement(IN)]
bools = 
for curve in curves:
connMan = curve.ConnectorManager
bool = 
for conn in connMan.Connectors:
#Assign your output to the OUT variable.
OUT = bools