do not divide by None for data.min and/or data.max being None (see patch #2833369)