Fixes bugzilla 16695

Simplified match using active patterns
Added null guards to the Project properties