Handling some TypeErrors - Issue #6

A lot more to be added in the future.
A lot to be improved too.

Took this chance to use proper regex for a cleaner string "parsing"