(1)If an action is brought in circumstances in which section 31 or 32 provides that no action lies, a judge of the court in which the action is brought may, on the application of the defendant, strike out the proceedings in the action.
(2)If a judge strikes out proceedings under subsection (1), he may if he thinks fit order the person bringing the action to pay costs.