Optimization of "check_for_metric" function