[foldcode addon] Add an isFolded method