MIFOSX-1187 - added null checks before compare with min and max values