First you need to know what concatenation is:
outputChatBox("snow".."ball") --prints "snowball"
local str = "ball"
outputChatBox("snow"..str) --prints "snowball" as well
local str = false -- false and true are booleans
outputChatBox("snow"..str) -- Error: attempt to concatenate a boolean value
You cannot concatenate a boolean value to a string (so true or false)
But you can convert this value to a string by using tostring(myValue):
local str = false
outputChatBox("snow"..tostring(str)) -- prints "snowfalse"
According to the wiki page of getTeamName, this function returns false if the 1st argument was not a valid team.
So the problem comes from teamName which is not a valid team name. Try to print it to see what you get and if you can fix the problem yourself, please show us the function that triggers that event.
You should find something like:
triggerEvent("onPlayerChooseTeam", ...
(This event might be called from client side, so maybe triggerClientEvent instead.)
(Is this event coming from another resource ? If yes, then please give us the link.)
I hope my explainations was clear, simple and helpful.