Check type of variable before using it as string
Add support to table with Top threads

Add new functions to display the table with top threads using the
basic_metrics dict only to get the label of each metric.