empty database error catching
empty database error catching