UI most likely trims the value, so whitespace only ends with being empty, and therefore considered an invalid value. WIth API the expectation is for the sender to know what they’re doing, so altering the value would break trust.
A single space is also not empty, although it would be effectively the same when used with string.IsNullOrWhiteSpace(assetValue)