Parser: Refactor ViewExtractor in handling invalid input