Avoid TypeError when tool is not set.