Wouldn't it be faster to just check if(isnull(A.loc))? I would highly doubt A would be a turf without a loc. IE you managed to click a turf in nullspace.