you need to check if it implements ConsoleOutputInterface. Not all OutputInterface have getErrorOutput