Removed redundant None check in sample.