checking if returned value is null