Add duplicate check to to_stix method