jsoninfo / sgw: isGwSelectable function is common, use it as such