Maximum principle for hypersurfaces