I think the 'data' parameter here is actually an instance of ApplicantData JS class. This should be added as ApplicantData:hasTag(tagId) instead of doing the comparison here.