Fix bug with Promise.asPromise(null);