Check if stdout is a terminal before printing colors