It might be appropriate to use `yield` to run `check2d` and `check2d_2d`