Replaced isEmpty with not hasText