Implement fails_with_llvm compat method in terms of fails_with
Add nil check to partially address #26563