remove if blocks and use guard statements instead
Merge remote-tracking branch 'upstream/master'
Merge pull request #144 from acmetech/master

minor refactoring of object_type_base