Hi, Danielle! There are usually two check points for each attraction that has a height restriction, and they do check if someone even looks like they might not make it. Basically, he just has to measure up the 40 inch mark on the bar - with his shoes on. As long as he can't walk under the bar, and he hits the right line, he's good to go.
We traveled a few years ago with my brother's son, who at the time was just barely 40 inches tall. You have no idea how relieved I was when he made it through to some of the things he had been wanting to ride! With one of my girls being so much older than he was, he was getting frustrated at watching her go off with her dad to do the "cool things" while I took him to do something else.
And who knows - by the time you travel, he may not have any trouble at all clearing the height restriction - even if he was without his shoes!
Have a wonderful vacation!