NTR - IFNULL fix for old SQL versions