DRY up method of obtaining a resolved promise