Checking that .then is a function.