Detecting or checking connection