add check for data != NULL when loading mrblib