Adding type to nestedObject example