analytics: better handling of null tenant id in getTenantRecordId

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