Added is_literal, modified literal_symbol
Added tests
Handled AttributeError
Merge pull request #1865 from srjoglekar246/literal

Added is_literal, modified literal_symbol