Is Empty Function Not Working Properly

Is Empty Function Not Working Properly

39 relatedMetric = list();
40 relatedMetric = zoho.crm.getRelatedRecords("Metrics","Deals",dealId);

41 if(relatedMetric.isEmpty() == false)
{


Value is empty and 'isEmpty' function cannot be appliedat lineNumber 41

Not sure why this is happening? it's literally the purpose of the function to check if the passed list contains any values.