Lint for unnecessary type casts

Updates as mentioned in #11135