Use Result.t instead of failwith in type_contents
Use Result.t instead of failwith in type_contents

Summary: This just got caught below and turned into an `Error` anyway.

Reviewed By: mroch

Differential Revision: D27372991

fbshipit-source-id: ec9b1160d3c92f68057d52d1dcd03671669a25a6

mroch/flow,facebook/flow,mroch/flow,mroch/flow,facebook/flow,facebook/flow,facebook/flow,mroch/flow,mroch/flow,mroch/flow,mroch/flow,facebook/flow,facebook/flow,facebook/flow