make sure the key is not null