Coding basics: always return one data type
The code that calls the fmt_name() function doesn't have to worry about the data type. If no name was returned, the data could still be treated as a string even when empty. If a NULL value were returned instead of an empty string, the code wouldn't have been able to jump right into that switch statement that checks the string length.
Here's an example for arrays:
Because an array is always returned from the get_foods() function, we can immediately traverse the results with no worries of data types. If we couldn't always expect an array, we'd have more cluttered code to check what data type was returned. In this example, if no foods were found, the function returns an empty array, which naturally skip past the foreach loop. If a NULL value was returned, or BOOL, you'd have to deal with that.
There are situations where you need to return a mixed data type, but in general, return one data type for empty or failed routines. It keeps code clean and less complicated.