Add check to ensure that the patch object is in fact a patch object.
Add check to ensure that the patch object is in fact a patch object.

BUG=chromium-os:27415,chromium-os:29546,chromium-os:30042
TEST=unittests

Change-Id: If3b21632f3e766b8fbe56c0476c98253c2b4f585
Reviewed-on: https://gerrit.chromium.org/gerrit/27210
Commit-Ready: Brian Harring <fdc2d0a2e2340b623587cee5ea8dff425d1eb1f3@chromium.org>
Tested-by: Brian Harring <fdc2d0a2e2340b623587cee5ea8dff425d1eb1f3@chromium.org>
Reviewed-by: David James <f231dc574bbeb62604660cbc162d1b8642a0a3af@chromium.org>

chadversary/chromiumos.chromite,chadversary/chromiumos.chromite,coreos/chromite,bpsinc-native/src_third_party_chromite,zhang0137/chromite,coreos/chromite,zhang0137/chromite,bpsinc-native/src_third_party_chromite,zhang0137/chromite,bpsinc-native/src_third_party_chromite,coreos/chromite