public UnificationPair(Term lhs, Term rhs) {
        if (lhs == null || rhs == null) {
            throw new IllegalArgumentException(
                    "Both terms must not be null.");
        }

        this.lhs = lhs;
        this.rhs = rhs;
    }