null check in isThenable (fix #4
)