[Ide] Fixed possible null reference exception.