remove redundant type checking in semant