small optimizations in parser.getObj(), lexer.getObj()
Merge pull request #4829 from fkaelberer/optimize_parser_getObj

small optimizations in parser.getObj(), lexer.getObj()