Allow for 0 in values.

Testing if ( val && val < min ) means that values of 0 will not count. That doesn't seem correct to me.