if (ActivityHandler && ActivityHandler.activityDataType === 'webcontacts/email') 

if ActivityHandler.activtyDataType doesn't exist , it implies different than 'webcontacts/email' by definition, isn't it? or am I wrong?