verify type validity