Implement Promise.as() to check whether a value is a Promise