This might get into trouble when !conn. if (conn && conn.cardState === 'absent') ?