Fix bug in project templates server code where last commit compared
against empty string before checking for null