added check for not null value