Value is not a function

I’m trying to write a function that iterates through array and runs a trace statement if two specific objects in the array have the same color. In the code below, the variable color is an int used to store the color of the first object, and the function getType() returns an int that corresponds with the color of the object.

for (var c:int=0; c<10; c++) {
	if (list[5*c]!==null) {
		if (list[5*c+1]!==null) {
			if (temp.getType()==color) trace("YES");

This is the error I’m receiving:
TypeError: Error #1006: value is not a function.

It occurs on the final if statement. I’ve run into this error about 4 or 5 times while working on this project, but this one I cannot seem to get past. Any help would be greatly appreciated. Thanks