added checks to some CardsUtil utilities