Added a check to know if the database is filled