handle None condition to make test pass