check $GIT_DIR is indicating the directory or not