Addition to conversion functions

Added more try-catch to make it look cleaner

Exception handling for to_string conversion added