Test for promise.then instead of instanceof Promise