handle empty db