Improve IsFunction implementation across api, impl and json for
labelFunction use case in pie-chart.