Fixed NullPointerException by extending error check to also handle client side.
Merge pull request #267 from mattcr11/spark/clientcrash

Fixed NullPointerException