Credit Card validity check functions: refactor