Why catch error do not work in my case?

Why catch error do not work in my case? GasCounter_PrevDay has state 2.26
I got error and rule stop processing:

2018-01-03 14:38:40.169 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'OLED Resresh NEW': Could not cast NULL to java.lang.Number; line 181, column 68, length 34
try {
var t = GasCounter_PrevDay.state as Number
} catch ( Throwable e) {
	logWarn ("   ---> Devices", "Oled page3 error " + e)
	OledLines.set(23,"      Loading...    " ) 

catch(Exception e) and catch(Throwable e) seems to don’t work. Try

if (GasCounter_PrevDay.state != NULL) {...

I found that if i exit rule with return ;, and return ; was in try catch - other try catch stops working.

It doesn’t work because that is a language error that is not thrown as an exception. Like Harry, said, you need to check for NULL before you try casting it to Number.