This is because no project is selected. If you wrap the result in a statement to check and see if a project is selected, it will work properly.
VB Example:
Code:
If Projects.SelectedItem IsNot Nothing Then
result = Me.Projects.SelectedItem.Closed
End If
Note: You must save the new project and click refresh to be able to view the additional cost for the newly created project.