Inspecting the shape or condition, e.g. wrinkled or warped, of a medium to be printed before printing on it