// Valid attributes?
if (nameNode != null && massNode != null) {
try {
// Create new adduct.
final AdductType adduct = new AdductType(
nameNode.getNodeValue(),
Double.parseDouble(massNode.getNodeValue()));
// A new choice?
if (!newChoices.contains(adduct)) {