The issue is you're getting the .then property twice with this code: once inside isNonThenable, and once inside Promise.cast.