Use typesafe equality in an example

This prevents the sort of breakage in
c5980d619dd624288180383125a5dc09ed6b997e (which fixed a (spurious)
warning which should have been an error).

Fixing all usage of == seems a bigger task than I can manage right away.