`-hasText` should just work, assuming that `nameText` actually has text in it.