Enhance cell check logic