bug fix

added an if clause before playing for checking if the text length is
greater than 0