If result is undefined wrong error is thrown
Merge pull request #6 from colonyamerican/checkMethod

If result is undefined wrong error is thrown