Another code refactoring to change a utility method to an extension method