Do some sanity checks.