Bug 2271: Fixed potentional NPE in generateTypesFromChoiceCases

Added check to verify if parent is not null since not
all GeneratedTypes can implement ChildOf<parent>
definition.

Change-Id: I9b01dc154fa767e2411c563540135051c3aab678
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
(cherry picked from commit e296c756501bc50b1295a84a6ddd085850a71e32)
Merge "Bug 2271: Fixed potentional NPE in generateTypesFromChoiceCases" into stable/helium