
572 N.W.2d 414 (1997)
6 Neb. App. 224
Myron ANDERSEN, Appellant,
v.
James R. GANZ, Jr., Appellee.
No. A-96-576.
Court of Appeals of Nebraska.
December 2, 1997.
*416 William A. Wieland, of Healey Wieland Law Firm, Lincoln, for appellant.
Francis T. Belsky, of Katskee, Henatsch & Suing, Omaha, for appellee.
HANNON, IRWIN, and INBODY, JJ.
HANNON, Judge.
By a petition which alleged four separate causes of action, Myron Andersen sued James R. Ganz, Jr., an attorney at law, for legal malpractice. The second cause of action is one that was assigned to Andersen by Steven Walters, and the third cause of action, alleged to have accrued to Andersen and his wife jointly, is one in which Andersen's wife assigned her interest to Andersen. The trial court granted Ganz' motion for judgment on the pleadings on the second and third causes of action because it held that under Earth Science Labs. v. Adkins & Wondra, P.C., 246 Neb. 798, 523 N.W.2d 254 (1994), the causes of action were not assignable. Andersen now appeals from that order. We conclude that the second cause of action is an attempt to assign a nonassignable cause of action. However, we further conclude that a cause of action for legal malpractice which accrues to two people jointly may be assigned by one joint holder to the other. Accordingly, we affirm the trial court's dismissal of the second cause of action, but reverse its dismissal of the third cause of action, and remand that cause for further proceedings.

FACTUAL BACKGROUND
In order to attempt a clearer portrayal of the issues presented by this appeal, we will summarize the transactions as alleged in the petition and then summarize the separate causes of action upon which Andersen seeks to recover.
Andersen, Walters, and Donn Nelson entered into an agreement to build a 144-unit apartment complex (Huntington project) in Papillion, Nebraska, on land purchased from William Olson. The complex was to be owned by Huntington Park Apartments, Inc., a corporation formed for that purpose, with Nelson serving as incorporator and manager. Nelson, Andersen, and Walters all became stockholders in the corporation. When they were unable to obtain financing for construction cost overruns, they were forced to convey their stock to two investors identified as "Young" and "Johnston" in consideration for Young and Johnston's promise to assume all financial obligations of the project and to hold Andersen and Walters harmless from all claims, liens, debts, and obligations of the Huntington project.
From the beginning, Ganz had been employed by both Andersen and Walters to represent their interests in the Huntington project. It is alleged that on October 12, 1988, both Andersen and Walters delivered their stock to Ganz with directions not to deliver it to Nelson unless (1) the proposed agreement with Young and Johnston was sufficient to hold Andersen and Walters harmless against all creditors and Andersen and his wife harmless upon a promissory *417 note they had given to Olson (presumably, for the purchase of the land for the Huntington project), and (2) Nelson also delivered his stock in Huntington Park to Young and Johnston. Andersen further alleged that Ganz told Andersen and Walters the agreement would hold them harmless when it did not and that Nelson had delivered his stock when in fact he had not. Andersen also alleged that on November 1, 1988, Ganz delivered Andersen's and Walters' stock to Nelson.
The allegations of Ganz' negligence in the first, second, and fourth causes of action were all in connection with his delivery of the stock without compliance with the conditions, and the damages sought by Andersen were allegedly the proximate result of that negligence. However, the third cause of action was based upon an additional allegation of negligence on the part of Ganz in defending an action by Olson against Andersen and his wife on the above-referred-to promissory note. Andersen alleged that Olson took judgment against him and his wife for $196,737.64.
The original petition was not filed until November 20, 1990. There were several allegations intended to avoid the effect of the statue of limitations, but their sufficiency is not at issue in this appeal. Consequently, these allegations will not be summarized.
Andersen's operative petition is his fifth amended petition. In that petition, Andersen sought to recover damages as a result of Ganz' negligence as follows: First cause of actionAndersen's personal loss of ownership of Huntington stock and damage to his reputation in the building and construction industry; second cause of actionWalters' personal loss of ownership of Huntington stock and damage to his reputation in the building and construction industry; third cause of actionAndersen and his wife's loss in having the Olson judgment rendered against them; fourth cause of actionthe cost of having to employ additional attorneys to represent Myron Andersen Construction, Inc. Andersen also alleged, in his second cause of action, that Walters had assigned his "causes" of action to Andersen and, in his third cause of action, that Andersen's wife assigned her "causes" of action to Andersen. The fourth cause of action is not before us, and therefore, the allegations in it need not be summarized.
Ganz' answer to the fifth amended petition admitted some formal allegations and denied allegations of negligence or damages. In substance, it pled the statute of limitations and contributory negligence as affirmative defenses. The reply was essentially a general denial.
Ganz filed a motion for judgment on the pleadings on the second and third causes of action, arguing that these causes of action were not assignable. An accompanying notice provided that the hearing on the motion would take place on November 17, 1995. The motion contained the designation "19" (as opposed to "18" for Ganz' previously filed demurrer). The trial docket stated that No. 19 came on for hearing on November 17 with both parties represented by counsel and that the motion was argued and submitted. A trial docket note dated November 20 referred to "# 19. Demurrer of Defendant to Fifth Amended Petition," but then went on to state that the claims in the second and third causes of action were not assignable and, further, that the motion was sustained. According to the note, "[t]he 2nd and 3rd causes of action are stricken from the 5th Amended Petition." (We therefore treat the court's action as a judgment on the pleadings, notwithstanding the court's use of the term "demurrer.") Andersen's motion for new trial was later overruled.

ASSIGNMENTS OF ERROR
Andersen alleges that the trial court erred in (1) failing to find that "the assignor's [sic] of appellant's second and third causes of action were clients of the appellee, to whom the appellee owed a duty to practice in accordance with the applicable standard of care," (2) finding that the legal malpractice claims in the second and third causes of action were not assignable, (3) finding that Ganz did not waive any defect in the assignment of causes of action by his failure to timely object in a demurrer or answer, (4) failing to treat Ganz' motion for judgment on the pleadings as a demurrer, (5) failing to grant leave to amend *418 the petition, and (6) failing to allow amendments in the furtherance of justice.

STANDARD OF REVIEW
A motion for judgment on the pleadings is properly granted when it appears from the pleadings that only a question of law is presented. County of Seward v. Andelt, 251 Neb. 713, 559 N.W.2d 465 (1997). When reviewing a question of law, an appellate court reaches a conclusion independent of the lower court's ruling. Union Ins. Co. v. Land and Sky, Inc., 253 Neb. 184, 568 N.W.2d 908 (1997).

ANALYSIS
The outcome of this appeal is controlled by whether Walters and Andersen's wife can assign their legal malpractice claims against Ganz to Andersen. In Earth Science Labs. v. Adkins & Wondra, P.C., 246 Neb. 798, 523 N.W.2d 254 (1994) (finding defendants owed no duty to plaintiff because plaintiff was not client), the Nebraska Supreme Court, following the rule of the majority of other jurisdictions, clearly held that legal malpractice claims are not assignable. In doing so, the court reiterated the well-established rule that a lawyer's duty is to his client and does not extend to third parties absent facts establishing a duty to them. The court explained:
Although generally the law supports assignability of rights, it does not permit assignments for matters of personal trust or confidence, or for personal services. Roberts v. Holland & Hart, 857 P.2d 492 (Colo.App.1993). See, also, Schupack v. McDonald's System, Inc., 200 Neb. 485, 264 N.W.2d 827 (1978).
"... [T]he assignment of legal malpractice claims involve matters of personal trust and personal service and do not lend themselves to assignability because permitting the transfer of such claims would undermine the important relationship between an attorney and client." Roberts v. Holland & Hart, 857 P.2d at 495.
We are persuaded by the reasoning in Roberts and other jurisdictions which refuse to permit the assignment of legal malpractice claims because of public policy considerations concerning the personal nature and confidentiality of the attorney-client relationship.
Earth Science Labs., 246 Neb. at 801-02, 523 N.W.2d at 257. See, generally, 7 Am.Jur.2d Attorneys at Law § 212 (1997); Annot., 40 A.L.R.4th 684 (1985).
For ease of analysis, we now apply this holding to Andersen's two causes of action, in reverse order.

Third Cause of Action (Andersen and Wife).
In contrast to the second cause of action which accrued solely to Walters, the third cause of action accrued to both Andersen and his wife jointly. According to the allegations in the third cause of action, Olson took judgment against Andersen and his wife together under their promissory note, and Andersen and his wife pledged their personal assets in consideration of Olson's forbearance from execution on that judgment. The difficulty with the third cause of action is that Andersen himself, together with his wife, holds a cause of action against Ganz for legal malpractice.
The basis for the nonassignability of a cause of action for legal malpractice is the personal trust and confidential nature of the attorney-client relationship. When one of two joint alleged victims of legal malpractice assigns it to the other, no violence is done to the confidential relationship of the parties. The effect of such assignment is merely to allow one of the possible plaintiffs to avoid participation in a lawsuit.
Furthermore, the rule prohibiting the assignability of legal malpractice claims is analogous to the ancient notions of champerty and maintenance. The principles utilized in these doctrines throw some light on the issues in this case. "Champerty consists of an agreement whereby a person without interest in another's suit undertakes to carry it on at his own expense, in whole or in part, in consideration of receiving, in the event of success, a part of the proceeds of the litigation." 14 C.J.S. Champerty and Maintenance § 2 a. at 146 (1991). "Maintenance exists when a person without interest in a suit officiously intermeddles therein by assisting either party with money or otherwise *419 to prosecute or defend it." Id., § 2 b. at 147. The general rule is as follows:
Maintenance or champerty does not avoid a contract concerning litigation where the contracting parties both have an interest in the subject of the litigation or in the litigation itself; ... one who has an interest in the subject of litigation may properly purchase an additional interest free from a valid charge of maintenance.
14 Am.Jur.2d Champerty and Maintenance § 9 at 847 (1964).
Where a person promoting the suit of another has any interest whatever, legal or equitable, in the thing demanded, distinct from that which he may acquire by an agreement with the suitor, he is in effect also a suitor according to the nature and extent of his interest; accordingly any interest whatever in the subject matter of the suit is sufficient to exempt a party giving aid to the suitor from the charge of illegal champerty or maintenance.
14 C.J.S., supra, § 14 at 157.
The same logic applies to the nonassignability of legal malpractice claims. We conclude that a legal malpractice claim which is held by two or more persons jointly may be assigned by one joint holder to one or more of the other joint holders.

Second Cause of Action (Walters).
The second cause of action is Walters' legal malpractice claim against Ganz. While Walters' cause of action is possibly distinguishable from that of the plaintiff in Earth Science Labs. v. Adkins & Wondra, P.C., 246 Neb. 798, 523 N.W.2d 254 (1994), in that it arose out of the same conduct as Andersen's personal claim (first cause of action) against Ganz, the alleged damages suffered by the alleged common negligence was clearly suffered by each injured party separately. Thus, the rule against assignments of legal malpractice claims applies, and Walters' claim is not assignable to Andersen.

Other Assigned Errors.
In order to avoid the clear import of the holding of Earth Science Labs., supra, Andersen relies upon three points: (1) that Ganz waived the issue of nonassignability by failing to file a demurrer, (2) that the trial court erred in not treating the motion for judgment on the pleadings as a demurrer, and (3) that the trial court erred in not granting Andersen leave to amend the fifth amended petition or to file another amended petition.
Andersen contends that Ganz waived any objection he might have had to the assignability of the causes of action by not filing a demurrer or alleging the defect in the answer. Andersen argues, relying on Neb.Rev.Stat. § 25-808 (Reissue 1995), that any defect enumerated in Neb.Rev.Stat. § 25-806 (Reissue 1995) is waived if not taken by demurrer or answer. Although Andersen does acknowledge that, pursuant to § 25-808, the objection that the petition does not state a cause of action may be raised at any time, he argues that the defense that a cause of action for legal malpractice cannot be assigned is one that the plaintiff does not have legal capacity to sue, an enumerated defect in § 25-806.
Under § 25-808, one does not waive the objection that a petition does not state facts sufficient to constitute a cause of action (or that the court lacks jurisdiction) by failing to raise the issue, either by demurrer or by answer. A legal malpractice claim that has been assigned to the party bringing the claim does not state a cause of action because such cause cannot be lawfully assigned. Thus, an objection to such a defect is not waived by failure to raise it by a demurrer or in the answer.
A motion for a judgment on the pleadings is in the nature of a demurrer. Like a demurrer, it admits the truth of all well-pled facts in the pleadings of the opposing party, together with all reasonable inferences to be drawn therefrom. Watkins Products, Inc. v. Rains, 175 Neb. 57, 120 N.W.2d 368 (1963). A motion for judgment on the pleadings is properly granted when it appears from the pleadings that only a question of law is presented. County of Seward v. Andelt, 251 Neb. 713, 559 N.W.2d 465 (1997). Such is the case here: Because the only unresolved issue was a question of law, *420 the matter could properly be decided on a motion for judgment on the pleadings. Moreover, the court in Earth Science Labs., 246 Neb. at 802, 523 N.W.2d at 257, stated: "Because a legal malpractice claim is not assignable, there is no reasonable possibility that the plaintiff can amend its petition to state a cause of action...." This particular observation by the Supreme Court disposes of the third, fifth, and sixth errors claimed by Andersen. See, also, Hoch v. Prokop, 244 Neb. 443, 507 N.W.2d 626 (1993) (when court grants judgment on pleadings and dismisses case, losing party does not have right to amend pleadings); Baltensperger v. Wellensiek, 250 Neb. 938, 554 N.W.2d 137 (1996) (even when demurrer is sustained, court need not allow plaintiff to amend petition if it is clear that no reasonable possibility exists that such amendment will correct defect).

CONCLUSION
We conclude that legal malpractice claims cannot be assigned unless they are from one joint holder of the claim to another. Thus, we affirm the trial court's dismissal of the second cause of action, but reverse its dismissal of the third cause of action, and remand that cause for further proceedings.
AFFIRMED IN PART, AND IN PART REVERSED AND REMANDED FOR FURTHER PROCEEDINGS.
