pregnancy possibility?

I know this could be “dumb” but last night I was with my boyfriend and I let him put his dick on my pussy but it never went inside, it was just grinding. I’m on the pill and he didn’t cum near my vagina, I’m just curious if that was too risky. I just get really paranoid.