## Description
This PR fixes the issue when trying to import git connected app which
has Appsmith AI plugin and query added.
Steps to test the fixes:
1. Create an app and connect it to git
2. Create appsmith ai plugin and add a query
3. Commit all the changes
4. In a new workspace, import this app from git, import should go
through successfully
Fixes#37833
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags="@tag.Datasource"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12142783624>
> Commit: f4c90b129022c328b667bf2e34fe9e635d6d0ce7
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12142783624&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Datasource`
> Spec:
> <hr>Tue, 03 Dec 2024 17:11:00 UTC
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Enhanced null safety checks in the `getFileIds` method to prevent
potential `NullPointerExceptions`.
- **Tests**
- Introduced unit tests for the `FileUtils` class to validate the
behavior of the `getFileIds` method under various conditions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: “sneha122” <“sneha@appsmith.com”>