Closed rainyman2012 closed 2 years ago
Thank you Ehsan jaan for your consideration.
In most cases, input/data validation is performed by upper layers, and this if
just adds more overhead. Due to the nature of the language, it's better to check data types, not values.
When we pass an empty string it's good to handle the exception. Users can handle the empty input when the program raises an exception. by the way, it's a common input and we can handle it on behalf of them.