graph matching functions now type-check.