Fixed IsType bug.