Modified the checking of the return value of function team_addCard