Add error condition to JsonLoader.js because this was causing a crash.