If you haven't taken delivery yet, then I am sure the dealer has supplied the history of the vehicle. If he has not, he can --- so ask before you take delivery. As has been mentioned, check for bad painting, including inside the trunk and engine compartment.
Also, if you have the last 7 VIN, check to see what you have as extra. Click for the link
http://bimmer.work/ May give you a few more things to check to see if they are still working before you drive off the lot.
Check the tires and last time brakes were done. Maybe the dealer will do for free, or a discount, before you drive off the lot.