[stable-4.19 4/8] block: add helper for checking if queue is registered