Using `!parentName.empty()` will be better.