Changed logic in Project class to allow for new projects

When verifying project data you need to check whether there is a valid
ID or that the ID is NULL. When creating a new project the ID can be
NULL so that the project is created with the next available ID on save.