If a defendant in a criminal proceeding files a motion or other pleading that includes a claim alleging a state statute or municipal ordinance is unconstitutional, the defendant shall serve the attorney general with a copy of the motion or pleading. The attorney general shall be entitled to be heard on the matter. Failure to comply with this section shall not constitute a waiver of a defendant's constitutional rights or a defendant's right to raise a constitutional challenge.
C.R.S. § 16-9-501