How do I reconize a NPC or a Player?

I’m trying to trigger something if there is a NPC or a Player walking near you, how do you do that?

Ent:IsPlayer() and Ent:IsNPC(), to search for entities near you, use ents.FindInSphere.

Thanks!