Fix for crash on BuildTextFilter

We need to test if text is set.
Merge pull request #507 from remoe/patch-9

Fix for crash on BuildTextFilter