When is pattern is used
static bool Evaluate(object value)
=> value is string stringValue && string.IsNullOrWhiteSpace(stringValue);
Sonarqube detects it as code smell: “Change this condition so that it does not always evaluate to ‘false’”
But it works as expected when is pattern is not used
static bool Evaluate(object value)
=> value is string && string.IsNullOrWhiteSpace(value as string);