Fix #1071 - enderio NPE. Depending on the cause of the issue, will either be completely fixed or will give a proper stacktrace to what's causing the issue.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>