Closes #581. Only instantiate objects with same type

Related to https://github.com/caelum/vraptor4/pull/355