Grounds for discharge in certain cases.
If it appears on the return of the writ of habeas corpus that the petitioner is in custody by virtue of process from any court of this State, or judge or officer thereof, the petitioner may be discharged in any one of the following cases:
When the jurisdiction of the court or officer has been exceeded.
When the imprisonment was at first lawful, yet by some act, omission or event, which has taken place afterwards, the petitioner has become entitled to be discharged.
When the process is defective in some matter of substance required by law, rendering it void.
When the process, though proper in form, has been issued in a case not allowed by law.
When the person having the custody of the petitioner is not the person allowed by law to detain the petitioner.
Where the process is not authorized by any judgment, order or decree of any court, nor by any provision of law.
Where the petitioner has been committed or indicted on a criminal charge, including a misdemeanor, except misdemeanor violations of chapters 484A to 484E, inclusive, of NRS or any ordinance adopted by a city or county to regulate traffic, without reasonable or probable cause.
Where the petitioner has been committed or indicted on any criminal charge under a statute or ordinance that is unconstitutional, or if constitutional on its face is unconstitutional in its application.
Where the court finds that there has been a specific denial of the petitioner’s constitutional rights with respect to the petitioner’s conviction or sentence in a criminal case.