fixed app/favorite separation logic to handle null values appropriately