Added type checking while parsing.