I have done some more debugging and figured it out. For anyone who stumbles upon this in the future with the same problem - the aggregate query will still return a result, so the list will have size 1, but the result will have value null
. So the proper handling of this is:
@AuraEnabled(cacheable=true)
public static String wiredMethod() {
AggregateResult[] results = [SELECT MAX(Name) max FROM Object__c WHERE Available__c = true];
if (IntegerString.valueOf(results[0].get('max')) == null) return '';
else return (String) results[0].get('max');
}