Finish type-checking