You can find the IMEI number on the phone, then enter it into T-Mobile's IMEI verifier. Even though this is a T-Mo verifier, it will tell you if the device has been flagged for other carriers as well (at least it should). http://www.t-mobile.com/verifyIMEI.aspx
The easiest way to find the IMEI number is to dial *#06# on the keypad like you are calling a telephone number. The IMEI should automatically come up when you hit dial.