add if/else statement to avoid errors thrown when JavaScript adds FB shares after HTML renders