Do some sanity checks