Any person detained under this chapter shall be entitled to apply for a writ of habeas corpus.
§ 632.435, RSMo