TSPHP-462 check that variable is initialised - added the corresponding methods to IScope