I often want to hold a string that can not be null or blank - whitespace isn't good enough. The compiler handles String? nicely to prevent null, and we can use aNullableString.isNullOrBlank() to check if it is null or blank. However, this requires that the blank check be handled everywhere it is used then handle errors if it is blank, which can cause unexpected errors if you miss a spot.
Is there an easier way to define a type or extension to String that will enforce that the string must not be blank?