ensureType

abstract fun Solve.Request<E>.ensureType(context: E, term: Term)

Template method expected to throw if term does not have the expected type, and return normally otherwise.