fix text filter so it doesn't error out when no text is provided