added exception for when resources returns null
Merge pull request #4 from flyboarder/master

added exception for when resources returns null