<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_submodule(self):
 """ Check if the given path is a git submodule. See the docstrings for ``_check_submodule_using_git`` and ``_check_submodule_no_git`` for further details. """


        if (self.path is None or
                (os.path.exists(self.path) and not os.path.isdir(self.path))):
            return False

        if self.use_git:
            return self._check_submodule_using_git()
        else:
            return self._check_submodule_no_git()