Fix "NullReferenceException" when trying to get message from empty queue