added check for null
Merge pull request #16 from MichaelHilton/REST_Call

added check for null