wrapped results in if clauses to protect against node server crashes
Merge pull request #14 from MediaDash/error_handling

wrapped results in if clauses to protect against node server crashes