Ok my sites are setup so that if someone doesn't select an avatar they get blank.gif entered under user_avatar in the users table by default so technically none of my users lack an avatar, this said i can only imagine that on a normal setup any user that doesn't select an avatar gets nothing entered in the user_avatar field, if that is the case the following code will solve it for you, else if there is a value entered let me know
For PHP-Nuke 6.0
For PHP-Nuke 6.5