Making sure that the checkCredential method returns false if an IllegalArgumentException is thrown.