Checking if stdin indeed has the isatty() method before calling it.