tty: serial_core: add tty NULL check to uart_tx_stopped