Making unified class for all connection checks