I would get yourself tested, just to be on the safe side. More than likely you aren't, but there is a slight chance. If it was unprotected sex, even anal, I would get tested for STD's too. Better safe than sorry.
If it didn't go in your vagina your fine .
If he didn't *** your not pregnant