change to `unless media.empty?`