As ChaosBladE indicated it is generally good form to keep display code and logic code spearated. There are several ways to restructure your code to accomplish what you are attempting.
$font(,10,,)[%artist%]$font()
-or-
$if(%artist%,$font(,10,,)%artist%,)
&
$if($meta(album artist),$font(,10,,),)%album artist%
Yes sometimes I think it would be nice if all passive strings such as $font, $rgb, etc would return as false because it lets you do some quick tricks with code, a strong argument can be made that $if($font()) should logically test if the $font() function returns anything at all .. which it does, the font. In fact I would like to be able to use $if($font(fontname,,,),) to test if a font is installed.
Code doesn't always perform the way we expect it to, every language has it's little quirks. There is usually more than one way to code something, you should keep alternative approaches in mind whenever coding anything.