This is an internal function to check if names in a trait vector or matrix match a tree
name.check(phy, data)
a phylogeny in APE phylo format
A matrix or vector of named trait data corresponding to species in phy