trace2: fix incorrect function pointer check