I think you can just try-catch an import Error which will cover all cases