Add error handling
Merge pull request #45 from termoshtt/error_check_in_utility

Add error handling
Modified docstring of utility.py.