cast from string to int in extension method