[fix] Also allow functions to be passed directly