Can be written as ...
... boolean ...
$iflonger($meta(artist),,1,0)
... string ...
$iflonger($meta(artist),,$meta(artist),)
To tweak $if2 to expose the same behaviour when its argument is a text string output from $meta rather than a tag-field resp. tag-field content, there might be done some programming hard work to do.