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

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

        return $value;
    }