make all the get_type functions return lambdas correctly