Bugfix for issue #40

- added attribute checking and default setting before creating a new resource
Bugfix for issue #40

- added model as parameter to resource checking
Merge pull request #43 from ffeldhaus/iss40

Bugfix for issue #40