Added is_literal, modified literal_symbol

literal_symbol now raises ValueError is arg is not a literal.
is_literal has been added to check if an expression is a literal or not.