On a maximum principle for minimal surfaces and their integrable discrete counterparts