Checks if dbm is set before tear down