optimize "cast" and "string" and "collection".