Executes action if the currentPlatform is ApplicationType.HeadlessDesktop. Returns action result or null.