Make checking on switch status modular