Minor improvement to ModelMetadata extension method