Added semantic checking to neg and comp