Hi everybody

I am buying a phone from my friend and i would like to know how can i prevent from buying a blocked/barred/stolen phone.

I mean, what should i check (or ask the seller) before buying a mobile phone?