format: Check types for ~C and ~R.

Both require arguments to be characters and integers respectively.