window: Avoid creating an object to discard, just to see if it has a method