Function getStatsHandler

Gets the stats handler registered using setStatsHandler