public static function range($value, $min = null, $max = null)
    {
        list($value, $min, $max) = self::getProperValues($value, $min, $max);

        return !(($min !== null && $min > $value) || ($max !== null && $max < $value));
    }