How to prevent empty token from showing
The reason for what you experiencing is the default behavior of token_replace() to leave tokens untouched if no replacement value was provided.

In your case, the Token Filter module would have to provide the option 'clear' =&gt; true when calling token_replace().

You may want to try to apply the patch in this issue to the token_filter module.