make sure data is not null