add NonemptyText type and adapt code where necessary