Changed the way of boolean check

There is no need to use 'is True' or 'is False' in python.(PEP8 says 'never do that')
I think removing that states looks better and more eidetic.