Oh, it's not in AIProc. My bad.
Still, IsVehicle() will return true if the object is a vehicle and false if it's not. (eg. u.IsVehicle() will return a false if u is a building)
But, you're using a building enumerator. That only counts buildings, so adding that if is redundant.