This is the case in many programming languages including Mendix.
In the init of an object the string will be null (empty in Mendix terms) once the string is used and later on the content is removed the string is no longer null but set to an empty value.
This has not been changed in later versions and I don’t expect this to happen, would be a nice thing to have solved, but see for example this https://josjong.com/2017/10/16/null-vs-empty-strings-why-oracle-was-right-and-apple-is-not/ for some more insights to this particular issue.