A better test would be to check for an empty database, because that's what clearing a database does.