Replace != operator with \'is not\' statement according to PEP8