If An Element (connected to database) on Multi State Box is empty, can I disable the arrow for next/prev?

I have a dynamic page, which have a multi state box. The multi state box have 5 slides. Each slides have a media gallery element that are connected to dataset. For example, on slide 1 the media gallery is connected to #Type1, and on slide 2 is connected to #Type2, etc until the 5th slide.

But if let’s say slide 2, the #Type2 database is empty, I wanted to make the arrow for next slide on slide 1 disabled, is it possible?