Reduce code duplication in ResultBuilder

Add methods to check type etc. of method inputs.

Some checks and code had been duplicated in multiple places
in ResultBuilder.

Change-Id: I890a2d1484e8335c438564354363074a302b99a3
Merge "Reduce code duplication in ResultBuilder"