Type-checking projection function