added typecheck for read node