Check connection type to work better with tests with mock connection