Qml/JS Console: Fix crash for expressions typed before connecting

Task-number: QTCREATORBUG-10689
Change-Id: Iebce5596ff1cd71a1cd35e57ec302a6343134245
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>