Remove null parameter for failed promise on Promise.resolve()