I would prefer
if (!text.isEmpty()) {
It's more meaningful.