isPromise
This commit adds generic to `isPromise` function to help with type inference. PR Close #34168