add constant check for unary and primary expression