Added is_pi, is_sig etc. methods to general expressions.