shouldn't this be NULL or if (!avatar)