Both of this fucntions pretty much do the same , can i just remake the function so that internally it desides if phylogenetic or not and then just raise the exception if there is another type of metric problem ?