get_avatar()
returns An img element for the user's avatar or false on failure. The function does not output anything; you have to echo the return value.
so you can try something like that
if( get_avatar( get_the_author_meta( 'ID' ) ) == 0) {
// no img code
} else {
echo get_avatar( get_the_author_meta( 'ID' ) , 80 );
}