kalua: db: adding check() for manually checking if db has errors