Check if first two fields are taken if it is set next field and continue

So lets say that i have these fields:
slot1text
slot1img
slot2text
slot2img
slot3text
slot3img
slot4text
slot4img
slot5text
slot5img

Now i want mongoDB to check if the first 2 fields are full and if they are then it should check if the next 2 are full, and if they are not fill them and other wise continue and repeat this process. How could you do something like that?