Handling nil values and added LuaReadLocalVariable and LuaWriteLocalVariable.