avfilter/f_metadata: correct check for existing metadata