Check for boundary condition.