Apple have released an iCloud tool that can check a device's Activation Lock status which is good news for potential buyers in the second-hand market.
If you're looking at a used iPhone or iPad you can enter the IMEI or serial number into the tool and Apple will cross-check it against an internal database to determine whether or not Activation Lock is turned on for that device.
From the iCloud website 'Before you purchase an iPhone, iPad or iPod Touch from somebody else, make sure that Find my Phone Activation Lock is turned off and the device is ready for you to use.'
If the Activation Lock is turned on, you will be notified that the Apple ID and password will be needed to use the device.
Link to iCloud Tool here