Image ID is always invalid

Hey everyone! The title says it all, everytime I place an image ID that I know it works at the TextBox, it still says that it’s not valid. Also, when writing something else than numbers, it returns Unable to cast string to int64

picturepopup.Yes.MouseButton1Click:Connect(function()
	
	local choosedimg = picturepopup.photoID
	local isvalid = game:GetService('MarketplaceService'):GetProductInfo(choosedimg.Text, Enum.InfoType.Asset)
	
	if isvalid and isvalid.AssetTypeId == 13 then 
		photovalue.Value = 'rbxassetid://' ..tostring(choosedimg.Text)
		picturevalue.Value = false
	else
		choosedimg.Text = 'Invalid image ID :('
	end

end)

Any suggestions on fixing these issues would help me a lot! Thank you for your time.