src/: Factor out common machinery in `check-method-type' methods.