I might encapsulate this logic in a method like 'isValidCreditCardTransaction()'. And normally, I'd want to provide it via the object to which it refers, i.e. make it a method in `PaymentEntity`. However, I think generally we are not adding anything other than setter/getter to our entities (though I may have one where I didn't follow that rule). Lastly, maybe a comment as to why there would be a null transaction id at all.