Added NULL checking to Child class.