public Term substitute(Term term, Term replacement) {
        // If the user wants to substitute this variable, return the replacement.
        if (getName() != null && equals(term)) {
            return replacement;
        }

        return this;
    }