checking undefined for targetScope.