deep equality of function type checking