public static function filter($value = null, bool $allowNull = false)
    {
        if (self::valueIsNullAndValid($allowNull, $value)) {
            return null;
        }

        self::validateString($value);

        return self::filterUrl($value);
    }