Fix remaining none check
Update flake8