checking connection type