Did we have Imams before Prophet Muhammad?

Were the apostles of Christ considered Imams too? Did they commit sins?

There is no evidence that the guardians of the previous messengers were infallible with the same infallibility of our Imams, peace be upon them, and that does not necessitate that they commit sins, because infallibility for committing sins is something that is possible for every human being, even you and me.