Some checks for inconsistent DB.