(#1244) - fix leveldb validity check so it will fail in the browser