Set and get type in Context