allow passing NULL to gelektra_kdb_close