Function ifWaitable

Returns a readonly waitable if the specified value is a waitable. Otherwise, returns undefined