Simplify boolean check.
pylint cleanup