IIf(Booking Is Nothing, "Null", Booking.BookingID)

Booking is an object

and i wish to put its BOOKING id in sql string i am building

and this IIF looked to do the job quite nicely in a compact and neat way.

but nooo it HAS to evaluate booking.bookingid regardless it booking is nothing or not! (resulting in an error if it is nothing)

doesnt that suck!

what do u think.