public static function validIp($value)
    {
        if (empty($value)) {
            throw new \InvalidArgumentException("Empty IP address given.");
        }

        if (!filter_var($value, FILTER_VALIDATE_IP)) {
            throw new \InvalidArgumentException("Invalid IP address given.");
        }

        return $value;
    }