Empty result values in templating for Elasticsearch datasource

Hello to everyone!
I have some difficulties with templating: when I use templating query ({“find”: “terms”, “field”: “extAppName”, “query”: “application:$system AND module:$module”}) I see all results except of the “null”(empty) results.
Can I constract some query where if I have a “null” result than this “null” will be replaced with some name (which I will set)? Maybe somebody could advice how to get empty results with templating…
Thanks a lot for help.