Catch null token error on the JS side.