Proposed fix for a crash I ran into.

In theory this modification should help prevent the client from crashing...

However, there is likely a better way to ensure a null pointer is created.

Note: I avoided a try-catch statement as exceptions are costly things to be thrown, despite the fact that they may be caught.

Log (For Reference):

https://gist.github.com/RlonRyan/36161479f27eebcbcd9e