safe check for cell_max