refine condition for grid() args processing