One of the most important aspect of any application code is to ensure that we are having correct data to be processed or to be shared. This ensure that we are working with valid data and avoid any issues which can result due to data inconsistencies.
We spend a considerable time in checking things like
- Possible null references
- Empty Array
- Invalid values
These things can quickly spiral in case we have objects with multiple level of composition.
https://pulgupta.com/2019/09/20/bean-validations-in-micronaut/