Script won't detect if selected model contains a Humanoid anymore?

I’m playing around with plugins and I ran across this error when implementing a check which uses selection service to detect if the selected object has a humanoid. It keeps on erroring:

 user_Simplifinding.rbxmx.Simplifinding.Simplifinding:90: attempt to index nil with 'Dummy'  -  

Dummy Is A Character with a humanoid, so I don’t understand where I’ve gone wrong

Section Of Code:

local function SelectionChanged()
	if interface ~= nil then
		for i, v in pairs( interface.BC.Frame.Points:GetChildren()) do
			if v:IsA("Frame") then
				v:Destroy()
			end
		end
		local Selection = SelectionService:Get()
		if #Selection == 1 and Selection[1]:IsA("Model") and Selection[1]:FindFirstChildOfClass("Humanoid")then
			lastSelection = Selection[1]
			GetWaypointData()
			if not Instances[Selection[1].Name] then
				GetWaypointData()
				local Name = Selection[1].Name
				Instances.Name = {
					["Points"] = {

					},
					["Waypoint"] = 1
				}
			else
				GetWaypointData()
				print("Already stored this instance")
				local Def = Instances[Selection[1].Name].Waypoint
				if Def == nil then
					Def = 1
					SaveWaypointData()
				end
				for i, v in pairs(Instances[Selection[1].Name].Points) do
					if  Def >= 1 then
						local DefaultLayoutClone = script.DefaultLayout:Clone()
						local ScrollingFrame = interface.BC.Frame.Points
						DefaultLayoutClone.Parent = ScrollingFrame
						DefaultLayoutClone.Name = Selection[1].Name.."_DefaultPoint_"..Def
						DefaultLayoutClone.PointName.Text = DefaultLayoutClone.Name
						if not workspace:FindFirstChild(DefaultLayoutClone.Name) then
							DefaultLayoutClone:Destroy()
						else
							Def -=1 

						end
					end
				end
			end
			if Selection[1]:FindFirstChildOfClass("Humanoid").DisplayName == "" then
				TitleTextLabel.Text = Selection[1].Name
			else
				TitleTextLabel.Text = Selection[1].Name.." (AKA "..Selection[1]:FindFirstChildOfClass("Humanoid").DisplayName..")"
			end

		elseif #Selection == 1 and not  Selection[1]:IsA("Model") and not Selection[1]:FindFirstChildOfClass("Humanoid")then
			TitleTextLabel.Text = "Please Select A Model With A Humanoid..."
		elseif #Selection == 0 then
			TitleTextLabel.Text = "No target identified... Please Select A Model With A Humanoid"
		elseif #Selection > 1 then
			TitleTextLabel.Text = "Sorry, but multiple NPC Programming isn't supported yet..."
		end
	end


end

Help?

P.S. It’s meant to create a default table for the selected instance if it isn’t on the datastored table

Line 90 is

if not Instances[Selection[1].Name] then