added type checking for a method in cards.py