Fix test of .is method
Refactoring