fix check for None