The defendant may demur to the accusatory pleading at any time prior to the entry of a plea, when it appears upon the face thereof either:
1.If an indictment, that the grand jury by which it was found had no legal authority to inquire into the offense charged, or, if any information or complaint that the court has no jurisdiction of the offense charged therein;
2.That it does not substantially conform to the provisions of Sections 950 and 952, and also Section 951 in case of an indictment or information;
3.That more than one offense is charged, except as provided in Section 954;
4.That the facts stated do not constitute a public offense;
5.That it contains matter which, if true, would constitute a legal justification or excuse of the offense charged, or other legal bar to the prosecution.