Add type checks for PhabricatorProject and ManiphestTask

Change-Id: Ie6d53fb8da079b2ceaf09cbe6414b3595121b9bc
Merge remote-tracking branch 'upstream/master'