simplify 'if' in test

The test also can be used to documentation this way is important get code more clean.