fix null pointer for situation when call registered function from console

When we call <code>exprReturn(program)</code>, then we got null pointer exception, cuz <code>locals</code> not initialized yet