Frege's Theory of Types