analytics: fix NPE when tenantId is null

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>