Added a utility method to get a context type by name