only save if there's a db