Check project_id existance depending on case

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>