Fix invalidation in show_unquoted (#38265)
Without this assertion `arg1` is inferred as `Any`, and the method gets invalidated when
loading CategoricalArrays. Not sure why the compiler isn't able to detect the type
automatically given the `isa` checks in the `if`.