If the defendant is an infant or a person with mental illness, the court may appoint a guardian ad litem for the defendant.