Handling null values in tokens in civimail (and elsewhere)
We used the Dave's Blog https://civicrm.org/blog/dave-greenberg/civimail-how-to-add-default-values-for-empty-tokens 

The blog provides a sample code and the hook which need to be used. We added the same tokenValues() hook to the extension and it works great in replacing all the empty token values with the one specified in the hook.