fixes #37 text filter validation (so as not to throw exception in case of regexp)