List generator is used instead of for_loop.
 Catching specific exception (suppress pylint warning).
 Simplify instance checking of the value.
Merge pull request #196 from gmist/minor_changes_simplifications

Minor changes and simplifications