Throws error if object parameter is not valid in the API response
Fixed global variable leak
Merge branch 'feature/issue-8-error-checking-for-objects' into develop