Check for existence of identifier declaration

This commit fixes a bug that occured whenever
the `findIdentifierAt` method was executed on
an identifier, which was not declared yet.