I think we could move the logic for attr name and type to the `GeneratedAttribute` class, so that the logic is in one place and you can check like `attribute.password_digest?` or something like that.