chunk.getName() != null &&
chunk.getName().equals("Text") &&
chunk.getCommands().length > 0) {
// First command
Command cmd = chunk.getCommands()[0];
if(cmd != null && cmd.getValue() != null) {
// Capture the text, as long as it isn't
// simply an empty string
String str = cmd.getValue().toString();
if(str.equals("") || str.equals("\n")) {
// Ignore empty strings
} else {
text.add( str );
}