Check for equality first in Str::is.