Yes, exactly. We use the idiom of 'pigeonholing' people to describe a tendency to stereotype. It's the idea of making a snap judgement about someone based on first impressions or a single piece of information, then fitting them into a predetermined slot and not looking beyond this narrow definition.