don't generate unnecessary {} for if statement

if then or else is not instance of Begin, don't generate unnecessary {}