Fix NPE when passing adapter in load/dump options