Replace is_multilabel with type_of_targets

and helper function for metrics