Add check of the agent response.
If an agent returns invalid response the drush process fails with an error because a new ChatMessage cannot be created with a NULL value as text. Closes #3547768
If an agent returns invalid response the drush process fails with an error because a new ChatMessage cannot be created with a NULL value as text. Closes #3547768