Fixes #20 - Add a check for null class
Merge pull request #21 from martin-g/20-npe-while-locating

Fixes #20 - Add a check for null class