Cast nilable var to Object when the var node is of Object type