corrected check for None