Update spark.dart

add null check when creating new projects