Some pattern matching with types.