check position for parsing errors