GetLastPerceptionSeen returns an int, and you can't compare an int to an object. It would have to go something like:
object oPerceived = GetLastPerceived();
if (GetTag(oPerceived) == "InsertYourTagHere" && GetLastPerceptionSeen()) {
//Do stuff here
}