make generic async function return promise when callback not present