fix if statement for batch effect so function only attempts to plot batch effects if batch covariate name given