NXP-12375: improve performance of queue presence check