Avoid to crash for invalid source