COUNT(DISTINCT field_name) is returning null

In ElasticSearch 7.4.2 version, COUNT(DISTINCT field_name) is returning null instead of 0. Canvas is showing below error

In ElasticSearch 7.3 version, COUNT(DISTINCT field_name) is returning 0