What sort of side effects are you getting? Is Building Number a number or a string that represents a number? There appears to be nothing wrong with your expression....
I am running 10.4 and had a label script similar to yours and it runs with no problems except that the number is a string number so I had to convert the string to a number......
Function FindLabel ( [MDXID] )
if Int([MDXID]) < 140 then
FindLabel = [MDXID]
end if
End Function