check_phylogeny function

Check if the phylogeny is a valid phylogeny object.