#type_cast - improve performance & readability
Merge pull request #13100 from akshay-vishnoi/f-refactor

#type_cast - improve performance & readability