Check for connection