Don't set a legend if it doesn't exist