Update load.r

check inst is not null