handle null cards error