Fix validation if have query to plot in chart