remove check for None in sample code