Fix for crash on BuildTextFilter

We need to test if text is set.