Removed the illegalArgumentException while validating card. Added method to return the type of the card.