10 years later, I fell victim to the same issue. Fortunately, I found that, though (rt IS NOT NULL) does not work, yet the (NOT rt IS NULL) works like charm.