Add error check for operators in types