added check for method field type

returns and error object of invalid request if it is not string.