updating to throw an error if no database object is set