How to know if a project is checked out or checked in from PSI?
Use Project.ReadProjectList or Project.ReadProject.
This will return a ProjectDataTable in ProjectDataSet.Project. From there you can check the PROJ_CHECKOUTBY and PROJ_CHECKOUTDATE columns.