When the court in which a civil action is pending determines that it lacks jurisdiction of the subject matter of the action, but that some other Michigan court would have jurisdiction of the action, the court may order the action transferred to the other court in a place where venue would be proper. If the question of jurisdiction is raised by the court on its own initiative, the action may not be transferred until the parties are given notice and an opportunity to be heard on the jurisdictional issue.
Mich. R. Civil. Proc. 2.227