added exception handling for empty metric (before displaying)