Remove panic from unmarshal for invalid datatypes.

This PR will fix #18 

- [x] AddResource
- [x] Rest methods