Boundary condition check