Remove redundant type check