Using the api function isInteractive instead of using the getOption.