Allow "title" as text or function