check if output pointers have been provided before setting them

obviously calling stats_from_peer() without providing a pointer for the output
buffer is useless and might be considered wrong
documented the shardcache_client api