Update SwiftmailerExtension.php

Optimize condition, it's more proper and clear this way.