added validation of java type hierarchy