DataStore StringValue Blank But Not Returning Nil

I have a StringValue in my datastore. Despite it being blank when printing it it doesn’t recognise it as nil. Even when I do a check if stringvalue == "" it still doesnt recognise it as blank. I need to know how I can set a default value if my stringvalue is nil.

local DataStoreService = game:GetService("DataStoreService")
local housename = DataStoreService:GetDataStore("housename")

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	
	local house = Instance.new("Folder")
	house.Parent = player
	house.Name = "house"
	
	local houseName = Instance.new("StringValue")
	houseName.Parent = house
	houseName.Name = "HouseName"
	--houseNum.Value = 1
	
	local defaultvalue = "StarterHouse"
	
	local playerUserId = "Player_"..player.UserId
	
	-- load data
	local data
	local success, errormessage = pcall(function()
		
		data = housename:GetAsync(playerUserId)
		
	end)
	
	if data == nil then
		data = defaultvalue
	end
	
	if success then
		houseName.Value = data 
	elseif errormessage then
		print(errormessage)
	end

end)
	
Players.PlayerRemoving:Connect(function(player)
	local playerUserId = "Player_"..player.UserId
	
	local data = player.house.HouseName.Value
	
	local success, errormessage = pcall(function()
		housename:SetAsync(playerUserId, data)
	end)
	
	if success then
		print("data saved")
	end
	
end)

You could use this string function:

if data:match("^%s*$") then - string is empty or only has spaces/whitespace in it
    print('Empty')
    data = defaultvalue
else -- string is not empty
    print('not empty')
end